Package uk.ac.rdg.resc.edal.util
Class Array1D<T>
- java.lang.Object
-
- uk.ac.rdg.resc.edal.util.Array1D<T>
-
- All Implemented Interfaces:
Serializable
,Iterable<T>
,Array<T>
- Direct Known Subclasses:
ImmutableArray1D
,SingleValueImmutableArray1D
,ValuesArray1D
public abstract class Array1D<T> extends Object implements Array<T>, Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Array1D(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNDim()
Gets the number of dimensions of the array.int[]
getShape()
Gets the shape of the array, i.e.Iterator<T>
iterator()
Returns an iterator over all the values in the array.long
size()
Gets the number of values in the array.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
getNDim
public final int getNDim()
Description copied from interface:Array
Gets the number of dimensions of the array. Equal to getShape().length.
-
iterator
public Iterator<T> iterator()
Description copied from interface:Array
Returns an iterator over all the values in the array. The convention is that the last dimension (represented by the last entry in getShape()) varies fastest.
-
size
public long size()
Description copied from interface:Array
Gets the number of values in the array.
-
-