Class ArrayLong

java.lang.Object
org.yamcs.studio.data.vtype.ListLong
org.yamcs.studio.data.vtype.ArrayLong
All Implemented Interfaces:
Serializable, CollectionLong, CollectionNumber, ListNumber

public final class ArrayLong extends ListLong implements Serializable
Wraps a long[] into a ListLong.
See Also:
  • Constructor Details

    • ArrayLong

      public ArrayLong(long... array)
      A new ArrayLong that wraps around the given array.
    • ArrayLong

      public ArrayLong(long[] array, boolean readOnly)
      A new ArrayLong that wraps around the given array.
      Parameters:
      array - an array
      readOnly - if false the wrapper allows writes to the array
  • Method Details

    • iterator

      public IteratorLong iterator()
      Description copied from interface: CollectionNumber
      Returns an iterator over the elements of the collection.
      Specified by:
      iterator in interface CollectionLong
      Specified by:
      iterator in interface CollectionNumber
      Overrides:
      iterator in class ListLong
    • size

      public int size()
      Description copied from interface: CollectionNumber
      Returns the number of elements in the collection.
      Specified by:
      size in interface CollectionNumber
    • getLong

      public long getLong(int index)
      Description copied from interface: ListNumber
      Returns the element at the specified position in this list casted to a long.
      Specified by:
      getLong in interface ListNumber
      Parameters:
      index - position of the element to return
      Returns:
      the element at the specified position in this list
    • setLong

      public void setLong(int index, long value)
      Description copied from interface: ListNumber
      Changes the element at the specified position, casting to the internal representation.
      Specified by:
      setLong in interface ListNumber
      Overrides:
      setLong in class ListLong
      Parameters:
      index - position of the element to change
      value - the new value
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class ListLong