Interface ArrayValue

  • All Superinterfaces:
    java.lang.Iterable<Value>, Value
    All Known Subinterfaces:
    ImmutableArrayValue
    All Known Implementing Classes:
    ImmutableArrayValueImpl

    public interface ArrayValue
    extends Value, java.lang.Iterable<Value>
    Representation of MessagePack's Array type. MessagePack's Array type can represent sequence of values.
    • Method Detail

      • size

        int size()
        Returns number of elements in this array.
      • get

        Value get​(int index)
        Returns the element at the specified position in this array.
        Throws:
        java.lang.IndexOutOfBoundsException - If the index is out of range (index < 0 || index >= size())
      • getOrNilValue

        Value getOrNilValue​(int index)
        Returns the element at the specified position in this array. This method returns an ImmutableNilValue if the index is out of range.
      • iterator

        java.util.Iterator<Value> iterator()
        Returns an iterator over elements.
        Specified by:
        iterator in interface java.lang.Iterable<Value>
      • list

        java.util.List<Value> list()
        Returns the value as List.