Class ArrayDouble

java.lang.Object
org.yamcs.studio.data.vtype.ListDouble
org.yamcs.studio.data.vtype.ArrayDouble
All Implemented Interfaces:
Serializable, CollectionDouble, CollectionNumber, ListNumber

public final class ArrayDouble extends ListDouble implements Serializable
Wraps a double[] into a ListDouble.
See Also:
  • Constructor Details

    • ArrayDouble

      public ArrayDouble(double... array)
      A new read-only ArrayDouble that wraps around the given array.
      Parameters:
      array - an array
    • ArrayDouble

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

    • iterator

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

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

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

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

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