Skip to content

Class Value.ArrayValue

Javadoc 27 generates this reference during each site build from the exported packages and the annotation processor. The Java guide shows the API in use.

java.lang.Object
dev.gecode.iris.Value.ArrayValue
All Implemented Interfaces:
Value
Enclosing interface:
Value
public static final class Value.ArrayValue extends Object implements Value
An array, or a row of a larger array, whose elements stay in place until they are asked for.
  • Method Details

    • type

      public ValueType type()
      Description copied from interface: Value
      Returns the type of the leaves.
      Specified by:
      type in interface Value
      Returns:
      the type of the leaves
    • depth

      public int depth()
      Description copied from interface: Value
      Returns the depth: 0 for a single value, and otherwise the levels of nesting.
      Specified by:
      depth in interface Value
      Returns:
      the depth: 0 for a single value, and otherwise the levels of nesting
    • size

      public int size()
      Description copied from interface: Value
      Returns the number of elements of this array.
      Specified by:
      size in interface Value
      Returns:
      the number of elements of this array
    • get

      public Value get(int index)
      Description copied from interface: Value
      Gets an element of this array.
      Specified by:
      get in interface Value
      Parameters:
      index - the index of the element, counted from 0
      Returns:
      the element
    • longs

      public long[] longs()
      Description copied from interface: Value
      Returns a copy of the integers of this one-dimensional array.
      Specified by:
      longs in interface Value
      Returns:
      a copy of the integers of this one-dimensional array
    • doubles

      public double[] doubles()
      Description copied from interface: Value
      Returns a copy of the numbers of this one-dimensional array, integers as floats.
      Specified by:
      doubles in interface Value
      Returns:
      a copy of the numbers of this one-dimensional array, integers as floats
    • strings

      public List<String> strings()
      Description copied from interface: Value
      Returns the strings of this one-dimensional array, as an unmodifiable list.
      Specified by:
      strings in interface Value
      Returns:
      the strings of this one-dimensional array, as an unmodifiable list
    • equals

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Returns the array in canonical JSON.
      Overrides:
      toString in class Object
      Returns:
      the array in canonical JSON