Package org.yamcs.studio.data.vtype
Class ArrayLong
java.lang.Object
org.yamcs.studio.data.vtype.ListLong
org.yamcs.studio.data.vtype.ArrayLong
- All Implemented Interfaces:
Serializable
,CollectionLong
,CollectionNumber
,ListNumber
Wraps a
long[]
into a ListLong
.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
long
getLong
(int index) Returns the element at the specified position in this list casted to a long.iterator()
Returns an iterator over the elements of the collection.void
setLong
(int index, long value) Changes the element at the specified position, casting to the internal representation.int
size()
Returns the number of elements in the collection.
-
Constructor Details
-
ArrayLong
public ArrayLong(long... array) A newArrayLong
that wraps around the given array. -
ArrayLong
public ArrayLong(long[] array, boolean readOnly) A newArrayLong
that wraps around the given array.- Parameters:
array
- an arrayreadOnly
- if false the wrapper allows writes to the array
-
-
Method Details
-
iterator
Description copied from interface:CollectionNumber
Returns an iterator over the elements of the collection.- Specified by:
iterator
in interfaceCollectionLong
- Specified by:
iterator
in interfaceCollectionNumber
- Overrides:
iterator
in classListLong
-
size
public int size()Description copied from interface:CollectionNumber
Returns the number of elements in the collection.- Specified by:
size
in interfaceCollectionNumber
-
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 interfaceListNumber
- 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 interfaceListNumber
- Overrides:
setLong
in classListLong
- Parameters:
index
- position of the element to changevalue
- the new value
-
equals
-