Package gnu.kawa.functions
Class Arrays.BuiltArray<E>
- java.lang.Object
-
- gnu.lists.AbstractSequence<E>
-
- gnu.kawa.functions.Arrays.BuiltArray<E>
-
- All Implemented Interfaces:
Array<E>
- Enclosing class:
- Arrays
public static class Arrays.BuiltArray<E> extends AbstractSequence<E> implements Array<E>
Class for implementing computed (virtual) array. Used by build-array procedure.
-
-
Field Summary
-
Fields inherited from class gnu.lists.AbstractSequence
noInts
-
-
Constructor Summary
Constructors Constructor Description BuiltArray(Procedure getter, int[] dimensions, int[] lowBounds)
BuiltArray(Procedure getter, Procedure setter, int[] dimensions, int[] lowBounds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkCanWrite()
E
get()
E
get(int i)
E
get(int[] indexes)
E
get(int i, int j)
E
get(int i, int j, int k, int... rest)
int
getLowBound(int dim)
Get the least dimension along the specified dimension.E
getRaw(int effi)
Given an "effective index", return element as object.int
getSize(int dim)
Get length along specified dimension.int
rank()
Get the rank (number of dimensions) of this array.void
set(int[] indexes, E value)
void
setRaw(int effi, E value)
Given an "effective index", set selected element.-
Methods inherited from class gnu.lists.AbstractSequence
add, add, addAll, addAll, addPos, asImmutable, badRank, boundedHash, checkRank, clear, compare, compare, compare, consume, consume, consumeNext, consumePosRange, contains, containsAll, copyPos, createPos, createRelativePos, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, elements, endPos, equals, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, getAttribute, getAttributeLength, getBooleanRaw, getByteRaw, getCharRaw, getContainingSequenceSize, getDoubleRaw, getElementKind, getFloatRaw, getIndexDifference, getInt, getInt, getInt, getInt, getInt, getIntRaw, getIterator, getIterator, getIteratorAtPos, getLongRaw, getNextKind, getNextTypeName, getNextTypeObject, getPosNext, getPosPrevious, getRowMajor, getShortRaw, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hashCode, hasNext, hasPrevious, indexOf, isAfterPos, isEmpty, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextIndex, nextMatching, nextPos, parentPos, previousPos, releasePos, remove, remove, removeAll, removePos, removePosRange, retainAll, set, setAt, setBuffer, setPosNext, setPosPrevious, size, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, toString, unsupported, unsupportedException
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gnu.lists.Array
asImmutable, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, getBooleanRaw, getByteRaw, getCharRaw, getDoubleRaw, getElementKind, getFloatRaw, getInt, getInt, getInt, getInt, getInt, getIntRaw, getLongRaw, getRowMajor, getShortRaw, getSize, isEmpty
-
-
-
-
Method Detail
-
checkCanWrite
protected void checkCanWrite()
- Overrides:
checkCanWrite
in classAbstractSequence<E>
-
rank
public int rank()
Description copied from interface:Array
Get the rank (number of dimensions) of this array. The rank of a scalar is 0, of a Sequence is 1, of a matrix is 2, etc.
-
getLowBound
public int getLowBound(int dim)
Description copied from interface:Array
Get the least dimension along the specified dimension.- Specified by:
getLowBound
in interfaceArray<E>
- Overrides:
getLowBound
in classAbstractSequence<E>
-
getSize
public int getSize(int dim)
Description copied from interface:Array
Get length along specified dimension.
-
get
public E get()
-
get
public E get(int i)
-
get
public E get(int i, int j)
-
get
public E get(int i, int j, int k, int... rest)
-
get
public E get(int[] indexes)
-
getRaw
public E getRaw(int effi)
Description copied from interface:Array
Given an "effective index", return element as object.
-
set
public void set(int[] indexes, E value)
-
setRaw
public void setRaw(int effi, E value)
Description copied from class:AbstractSequence
Given an "effective index", set selected element.
-
-