Class ArrayFloat

java.lang.Object
org.yamcs.studio.data.vtype.ListFloat
org.yamcs.studio.data.vtype.ArrayFloat
All Implemented Interfaces:
Serializable, CollectionFloat, CollectionNumber, ListNumber

public final class ArrayFloat extends ListFloat implements Serializable
Wraps a float[] into a ListFloat.
See Also:
  • Constructor Details

    • ArrayFloat

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

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

    • iterator

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

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

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

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

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