Package org.epics.util.array
Interface CollectionNumber
-
- All Known Subinterfaces:
CollectionByte
,CollectionDouble
,CollectionFloat
,CollectionInteger
,CollectionLong
,CollectionShort
,CollectionUByte
,CollectionUInteger
,CollectionULong
,CollectionUShort
,ListNumber
- All Known Implementing Classes:
ArrayByte
,ArrayDouble
,ArrayFloat
,ArrayInteger
,ArrayLong
,ArrayShort
,ArrayUByte
,ArrayUInteger
,ArrayULong
,ArrayUShort
,BufferInteger
,CircularBufferDouble
,ListByte
,ListDouble
,ListFloat
,ListInteger
,ListLong
,ListShort
,ListUByte
,ListUInteger
,ListULong
,ListUShort
,SortedListView
public interface CollectionNumber
A collection of numeric (primitive) elements. It provides basis iteration and copy to array.The method names are taken from
Collection
, though not all methods are specified. At this moment, the class is read-only. If in the future the class is extended, the new methods should match the names fromCollection
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description IteratorNumber
iterator()
Returns an iterator over the elements of the collection.int
size()
Returns the number of elements in the collection.default <T> T
toArray(T array)
-
-
-
Method Detail
-
iterator
IteratorNumber iterator()
Returns an iterator over the elements of the collection.- Returns:
- a new iterator
-
size
int size()
Returns the number of elements in the collection.- Returns:
- the number of elements in the collection
-
toArray
default <T> T toArray(T array)
- Type Parameters:
T
- the type of the array- Parameters:
array
- the array into which the elements of this list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.- Returns:
- an array containing the elements
- Throws:
ArrayStoreException
- if the type of the specified array is not a primitive number arrayNullPointerException
- if the specified array is null
-
-