Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Znav
nextJava Mapping for Dictionaries
prevJava 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:

Wiki Markup
{zcode:slice}
sequence<Fruit> FruitPlatter;
{zcode}

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:

Wiki Markup
{zcode:java}
Fruit[] platter = { Fruit.Apple, Fruit.Pear };
assert(platter.length == 2);
{zcode}

Alternate mappings for sequence types are also possible.

Ztop
See Also
Zret
Znav
nextJava Mapping for Dictionaries
prevJava Mapping for Structures