|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.abora.white.xpp.basic.Heaper
|
+--org.abora.white.collection.arrays.PrimArray
|
+--org.abora.white.collection.arrays.PtrArray
| Field Summary | |
protected Heaper[] |
storage
|
| Constructor Summary | |
protected |
PtrArray(Heaper[] source)
|
protected |
PtrArray(int count)
|
protected |
PtrArray(int size,
PrimArray from,
int sourceOffset,
int count,
int destOffset)
|
| Method Summary | |
boolean |
contentsEQ(PtrArray other)
|
boolean |
contentsEqual(PrimArray other)
Whether the two ranges contain semantically the same values. |
int |
contentsHash()
A hash of the entire contents of the array. |
void |
copyToBuffer(Heaper[] buffer,
int count,
int start)
|
int |
count()
Return the number of elements the array can hold. |
boolean |
elementsEQ(int here,
PrimArray other)
|
boolean |
elementsEQ(int here,
PrimArray other,
int there)
|
boolean |
elementsEQ(int here,
PrimArray other,
int there,
int count)
|
boolean |
elementsEqual(int here,
PrimArray other,
int there,
int count)
Whether the two ranges contain the same values, using the criteria defined in contentsEqual |
int |
elementsHash(int count,
int start)
A hash of the range of values out of the array. |
static PtrArray |
empty()
create a zero size PtrArray |
Heaper |
fetch(int index)
Retrieve a single element from the array. |
Heaper |
fetchValue(int index)
Fetch a value; may be a Heaper, null, or a PrimValue as appropriate to PrimArray subclass. |
Heaper |
get(int index)
Retrieve a single element from the array. |
int |
indexOf(Heaper value,
int start,
int nth)
Return the index of the nth occurrence of the given value at or after (before if nth is negative) the given index, or -1 if there is none. |
int |
indexOfEQ(Heaper value)
|
int |
indexOfEQ(Heaper value,
int start)
|
int |
indexOfEQ(Heaper value,
int start,
int nth)
|
int |
indexOfEQOrNull(Heaper value)
|
int |
indexOfEQOrNull(Heaper value,
int start)
|
int |
indexOfEQOrNull(Heaper value,
int start,
int nth)
|
int |
indexPast(Heaper value,
int start,
int nth)
Return the index of the nth occurrence of anything but the given value at or after (before if nth is negative) the given index, or -1 if there is none. |
int |
indexPastEQ(Heaper value)
|
int |
indexPastEQ(Heaper value,
int start)
|
int |
indexPastEQ(Heaper value,
int start,
int nth)
|
static PtrArray |
make(Heaper[] buffer)
create a PtrArray filled with data from 'buffer' |
static PtrArray |
make(int count)
create a PtrArray filled with NULLs |
static PtrArray |
make(int size,
PrimArray from)
|
static PtrArray |
make(int size,
PrimArray from,
int sourceOffset)
|
static PtrArray |
make(int size,
PrimArray from,
int sourceOffset,
int count)
|
static PtrArray |
make(int size,
PrimArray from,
int sourceOffset,
int count,
int destOffset)
create a PtrArray filled with the indicated data in 'from' |
protected PrimArray |
makeNew(int size,
PrimArray source,
int sourceOffset,
int count,
int destOffset)
Return a new array of the same type as this
initialized with the elements of source specified by
the index range, prepended by destOffset and postpended by
null or 0 elements. |
protected void |
printElementOn(int index,
java.io.PrintWriter oo)
Print a representation of the element at the given index. |
PrimSpec |
spec()
A description of the kinds of things which can be stored in this array |
void |
store(int index,
Heaper pointer)
|
void |
storeAll(Heaper value,
int count,
int start)
Fill a consequitive range of elements with the supplied value. |
void |
storeValue(int index,
Heaper value)
Store a value; may be a Heaper, null, or a PrimValue as appropriate to PrimArray subclass. |
protected Heaper |
zeroElement()
Return a suitable immutable zero element for this type of array; either 0 or null. |
| Methods inherited from class org.abora.white.collection.arrays.PrimArray |
copy, copy, copy, copy, copy, copyElements, copyGrow, elementsEqual, elementsEqual, elementsHash, elementsHash, getValue, indexOf, indexOf, indexOfElements, indexOfElements, indexOfElements, indexOfElements, indexOfElements, indexPast, indexPast, isEqual, printOn, storeAll, storeAll, storeMany, storeMany, storeMany, zeroElements, zeroElements, zeroElements |
| Methods inherited from class org.abora.white.xpp.basic.Heaper |
actualHashForEqual, destroy, destruct, equals, hashForEqual, printContentsOn, sendSelfTo, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final Heaper[] storage
| Constructor Detail |
protected PtrArray(int count)
protected PtrArray(int size,
PrimArray from,
int sourceOffset,
int count,
int destOffset)
protected PtrArray(Heaper[] source)
| Method Detail |
public static PtrArray make(int count)
public static PtrArray make(int size,
PrimArray from,
int sourceOffset,
int count,
int destOffset)
public static PtrArray make(int size,
PrimArray from,
int sourceOffset,
int count)
public static PtrArray make(int size,
PrimArray from,
int sourceOffset)
public static PtrArray make(int size,
PrimArray from)
public static PtrArray make(Heaper[] buffer)
public static PtrArray empty()
protected PrimArray makeNew(int size,
PrimArray source,
int sourceOffset,
int count,
int destOffset)
PrimArraythis
initialized with the elements of source specified by
the index range, prepended by destOffset and postpended by
null or 0 elements.
makeNew in class PrimArraysize - size of new array.source - source of elements to be initialized with in the new array.sourceOffset - first index of the source array to be included in the range.count - number of elements of source to include in the new arraydestOffset - first index of new array to be initialized with source elements.
public void store(int index,
Heaper pointer)
public Heaper get(int index)
public Heaper fetch(int index)
public void storeValue(int index,
Heaper value)
PrimArraythis can hold.
It is expected that most PrimArray clients will want to use less abstract access methods
storeValue in class PrimArrayindex - index in array the element will be stored at.value - heaper to store in this.public Heaper fetchValue(int index)
PrimArrayIt is expected that most PrimArray clients will want to use less abstract access methods.
fetchValue in class PrimArrayindex - index in array whose element will be returned
index.public PrimSpec spec()
PrimArray
spec in class PrimArraypublic int count()
PrimArray
count in class PrimArraypublic boolean contentsEQ(PtrArray other)
public boolean contentsEqual(PrimArray other)
PrimArray
contentsEqual in class PrimArraypublic int contentsHash()
PrimArray
contentsHash in class PrimArray
public boolean elementsEQ(int here,
PrimArray other,
int there,
int count)
public boolean elementsEQ(int here,
PrimArray other,
int there)
public boolean elementsEQ(int here,
PrimArray other)
public boolean elementsEqual(int here,
PrimArray other,
int there,
int count)
PrimArray
elementsEqual in class PrimArray
public int elementsHash(int count,
int start)
PrimArray
elementsHash in class PrimArray
public int indexOf(Heaper value,
int start,
int nth)
PrimArray
indexOf in class PrimArrayvalue - element that is to be matchedstart - index to start the search. If positive start from that index,
if negative start from relatie to end of array
public int indexPast(Heaper value,
int start,
int nth)
PrimArray
indexPast in class PrimArrayvalue - anything except this element that is to be matchedstart - index to start the search. If positive start from that index,
if negative start from relatie to end of array
public int indexOfEQ(Heaper value,
int start,
int nth)
public int indexOfEQ(Heaper value,
int start)
public int indexOfEQ(Heaper value)
public int indexOfEQOrNull(Heaper value,
int start,
int nth)
public int indexOfEQOrNull(Heaper value,
int start)
public int indexOfEQOrNull(Heaper value)
public int indexPastEQ(Heaper value,
int start,
int nth)
public int indexPastEQ(Heaper value,
int start)
public int indexPastEQ(Heaper value)
public void storeAll(Heaper value,
int count,
int start)
PrimArrayvalue.
storeAll in class PrimArrayvalue - to store within range or 0.0 if null.count - number of consequentive elements in range or all
elements from start if -1.start - index of first element in range.
public void copyToBuffer(Heaper[] buffer,
int count,
int start)
protected Heaper zeroElement()
PrimArray
zeroElement in class PrimArray
protected void printElementOn(int index,
java.io.PrintWriter oo)
PrimArrayindex.
printElementOn in class PrimArrayindex - index of element to be printed.oo - print stream to write element representation to.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||