Package gnu.lists
Class TransformedArray<E>
- java.lang.Object
-
- gnu.lists.AbstractSequence<E>
-
- gnu.lists.TransformedArray<E>
-
- All Implemented Interfaces:
Array<E>
- Direct Known Subclasses:
Arrays.ProcTransformedArray
,ComposedArray
,FlattenedArray
,GeneralArray
public abstract class TransformedArray<E> extends AbstractSequence<E> implements Array<E>
Indexes are mapped.
-
-
Field Summary
Fields Modifier and Type Field Description protected Array<E>
base
-
Fields inherited from class gnu.lists.AbstractSequence
noInts
-
-
Constructor Summary
Constructors Constructor Description TransformedArray()
TransformedArray(Array<E> base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkCanWrite()
boolean
getBooleanRaw(int effi)
byte
getByteRaw(int effi)
char
getCharRaw(int effi)
double
getDoubleRaw(int effi)
int
getElementKind()
float
getFloatRaw(int effi)
int
getInt(int i)
int
getInt(int i, int j)
int
getIntRaw(int effi)
long
getLongRaw(int effi)
E
getRaw(int effi)
Given an "effective index", return element as object.E
getRowMajor(int index)
short
getShortRaw(int effi)
void
setRaw(int index, 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, get, get, get, get, get, getAttribute, getAttributeLength, getContainingSequenceSize, getIndexDifference, getInt, getInt, getInt, getIterator, getIterator, getIteratorAtPos, getLowBound, getNextKind, getNextTypeName, getNextTypeObject, getPosNext, getPosPrevious, getSize, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hashCode, hasNext, hasPrevious, indexOf, isAfterPos, isEmpty, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextIndex, nextMatching, nextPos, parentPos, previousPos, rank, releasePos, remove, remove, removeAll, removePos, removePosRange, retainAll, set, 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, get, get, get, get, get, getInt, getInt, getInt, getLowBound, getSize, getSize, isEmpty, rank, set
-
-
-
-
Method Detail
-
getElementKind
public int getElementKind()
- Specified by:
getElementKind
in interfaceArray<E>
- Overrides:
getElementKind
in classAbstractSequence<E>
-
getRowMajor
public E getRowMajor(int index)
- Specified by:
getRowMajor
in interfaceArray<E>
- Overrides:
getRowMajor
in classAbstractSequence<E>
-
getRaw
public E getRaw(int effi)
Description copied from interface:Array
Given an "effective index", return element as object.
-
getBooleanRaw
public boolean getBooleanRaw(int effi)
- Specified by:
getBooleanRaw
in interfaceArray<E>
- Overrides:
getBooleanRaw
in classAbstractSequence<E>
-
getByteRaw
public byte getByteRaw(int effi)
- Specified by:
getByteRaw
in interfaceArray<E>
- Overrides:
getByteRaw
in classAbstractSequence<E>
-
getCharRaw
public char getCharRaw(int effi)
- Specified by:
getCharRaw
in interfaceArray<E>
- Overrides:
getCharRaw
in classAbstractSequence<E>
-
getShortRaw
public short getShortRaw(int effi)
- Specified by:
getShortRaw
in interfaceArray<E>
- Overrides:
getShortRaw
in classAbstractSequence<E>
-
getIntRaw
public int getIntRaw(int effi)
-
getLongRaw
public long getLongRaw(int effi)
- Specified by:
getLongRaw
in interfaceArray<E>
- Overrides:
getLongRaw
in classAbstractSequence<E>
-
getFloatRaw
public float getFloatRaw(int effi)
- Specified by:
getFloatRaw
in interfaceArray<E>
- Overrides:
getFloatRaw
in classAbstractSequence<E>
-
getDoubleRaw
public double getDoubleRaw(int effi)
- Specified by:
getDoubleRaw
in interfaceArray<E>
- Overrides:
getDoubleRaw
in classAbstractSequence<E>
-
getInt
public int getInt(int i)
-
getInt
public int getInt(int i, int j)
-
setRaw
public void setRaw(int index, E value)
Description copied from class:AbstractSequence
Given an "effective index", set selected element.
-
checkCanWrite
protected void checkCanWrite()
- Overrides:
checkCanWrite
in classAbstractSequence<E>
-
-