Package org.epics.util.array
Class ListUShort
- java.lang.Object
-
- org.epics.util.array.ListUShort
-
- All Implemented Interfaces:
CollectionNumber
,CollectionUShort
,ListNumber
- Direct Known Subclasses:
ArrayUShort
public abstract class ListUShort extends Object implements ListNumber, CollectionUShort
An ordered collection ofshort
s.- Author:
- Gabriele Carcassi
-
-
Constructor Summary
Constructors Constructor Description ListUShort()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
byte
getByte(int index)
Returns the element at the specified position in this list casted to a byte.double
getDouble(int index)
Returns the element at the specified position in this list casted to a double.float
getFloat(int index)
Returns the element at the specified position in this list casted to a float.int
getInt(int index)
Returns the element at the specified position in this list casted to an int.long
getLong(int index)
Returns the element at the specified position in this list casted to a long.int
hashCode()
IteratorUShort
iterator()
Returns an iterator over the elements of the collection.void
setAll(int index, ListNumber list)
Changes the elements starting at the specified position, taking them based on the internal representation.void
setByte(int index, byte value)
Changes the element at the specified position, casting to the internal representation.void
setDouble(int index, double value)
Changes the element at the specified position, casting to the internal representation.void
setFloat(int index, float value)
Changes the element at the specified position, casting to the internal representation.void
setInt(int index, int value)
Changes the element at the specified position, casting to the internal representation.void
setLong(int index, long value)
Changes the element at the specified position, casting to the internal representation.void
setShort(int index, short value)
Changes the element at the specified position, casting to the internal representation.ListUShort
subList(int fromIndex, int toIndex)
Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.epics.util.array.CollectionNumber
size, toArray
-
Methods inherited from interface org.epics.util.array.ListNumber
getShort
-
-
-
-
Method Detail
-
iterator
public IteratorUShort iterator()
Description copied from interface:CollectionNumber
Returns an iterator over the elements of the collection.- Specified by:
iterator
in interfaceCollectionNumber
- Specified by:
iterator
in interfaceCollectionUShort
- Returns:
- a new iterator
-
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 interfaceListNumber
- Parameters:
index
- position of the element to return- Returns:
- the element at the specified position in this list
-
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 interfaceListNumber
- Parameters:
index
- position of the element to return- Returns:
- the element at the specified position in this list
-
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
-
getInt
public int getInt(int index)
Description copied from interface:ListNumber
Returns the element at the specified position in this list casted to an int.- Specified by:
getInt
in interfaceListNumber
- Parameters:
index
- position of the element to return- Returns:
- the element at the specified position in this list
-
getByte
public byte getByte(int index)
Description copied from interface:ListNumber
Returns the element at the specified position in this list casted to a byte.- Specified by:
getByte
in interfaceListNumber
- 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 interfaceListNumber
- Parameters:
index
- position of the element to changevalue
- the new value
-
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 interfaceListNumber
- Parameters:
index
- position of the element to changevalue
- the new value
-
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
- Parameters:
index
- position of the element to changevalue
- the new value
-
setInt
public void setInt(int index, int value)
Description copied from interface:ListNumber
Changes the element at the specified position, casting to the internal representation.- Specified by:
setInt
in interfaceListNumber
- Parameters:
index
- position of the element to changevalue
- the new value
-
setShort
public void setShort(int index, short value)
Description copied from interface:ListNumber
Changes the element at the specified position, casting to the internal representation.- Specified by:
setShort
in interfaceListNumber
- Parameters:
index
- position of the element to changevalue
- the new value
-
setByte
public void setByte(int index, byte value)
Description copied from interface:ListNumber
Changes the element at the specified position, casting to the internal representation.- Specified by:
setByte
in interfaceListNumber
- Parameters:
index
- position of the element to changevalue
- the new value
-
setAll
public void setAll(int index, ListNumber list)
Description copied from interface:ListNumber
Changes the elements starting at the specified position, taking them based on the internal representation.- Specified by:
setAll
in interfaceListNumber
- Parameters:
index
- position of the first element to changelist
- the new values
-
subList
public ListUShort subList(int fromIndex, int toIndex)
Description copied from interface:ListNumber
Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.- Specified by:
subList
in interfaceListNumber
- Parameters:
fromIndex
- low endpoint (inclusive) of the subListtoIndex
- high endpoint (exclusive) of the subList- Returns:
- a view of the specified range within this list
-
-