public interface Array
The data is stored in a linear structure. The sizes array gives the dimensionality
and size for each dimension. The ordering defined by the sizes is [..., zSize, ySize, xSize]
.
Typical iteration is:
for (...) { for (int z = 0; z < zSize; z++) { for (int y = 0; y < ySize; y++) { for (int x = 0; x < xSize; x++) { array.getData().getDouble(... + z*ySize + y*xSize + x); } } } }
Object getData()
This method will either return a List
or a ListNumber
depending of the array type. A collection is returned, instead of an
array, so that the type implementation can be immutable or can at
least try to prevent modifications. ListNumber has also several
advantages over the Java arrays, including the ability to iterate the list
regardless of numeric type.
If a numeric array is actually needed, refer to CollectionNumbers
.
org.epics.util.array.ListInt getSizes()
The size of the returned list will be the number of the dimension of the array. Each number represents the size of each dimension. The total number of elements in the array is therefore the product of all the numbers in the list returned.
Copyright © 2010–2015. All rights reserved.