Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space IceMaster and version 3.7.1

Znav
nextJava Compat Mapping for Dictionaries
prevJava Compat Mapping for Structures

A Slice sequence maps to a Java array. This means that the Slice-to-Java compiler does not generate a separate named type for a Slice sequence.

For example:

Code Block
languageslice
titleSlice
sequence<Fruit> FruitPlatter;

This definition simply corresponds to the Java type Fruit[]. Naturally, because Slice sequences are mapped to Java arrays, you can take advantage of all the array functionality provided by Java, such as initialization, assignment, cloning, and the length member. For example:

Code Block
languagejava
titleJava Compat
Fruit[] platter = { Fruit.Apple, Fruit.Pear };
assert(platter.length == 2);

Alternate mappings for sequence types are also possible.

Ztop

See Also

Znav
nextJava Compat Mapping for Dictionaries
prevJava Compat Mapping for Structures