|
||||||||
| 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.PrimArithmeticArray
|
+--org.abora.white.collection.arrays.PrimIntegerArray
A common superclass for primitive arrays of integer types; this is the point to add bulk operations for Boolean operations, etc if we ever want them
| Constructor Summary | |
protected |
PrimIntegerArray()
|
| Method Summary | |
protected void |
addData(int start,
PrimArithmeticArray other,
int otherStart,
int count)
Arithmetic addition of the respective elements of other to this over the specified index range. |
protected int |
compareData(int here,
PrimArithmeticArray other,
int there,
int count)
Over given range, returns - if this < other; 0 if this == other; + if this > other. |
int |
elementsHash(int count,
int start)
A hash of the range of values out of the array. |
PrimIntegerArray |
hold(int index,
IntegerValue value)
|
PrimIntegerArray |
hold(int index,
IntegerValue value,
boolean canModify)
Store an integer value at the specified index. |
int |
indexOf(Heaper value,
int start,
int n)
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 |
indexOfInteger(IntegerValue value)
|
int |
indexOfInteger(IntegerValue value,
int start)
|
int |
indexOfInteger(IntegerValue value,
int start,
int nth)
|
int |
indexPast(Heaper value,
int start,
int n)
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 |
indexPastInteger(IntegerValue value)
|
int |
indexPastInteger(IntegerValue value,
int start)
|
int |
indexPastInteger(IntegerValue value,
int start,
int nth)
|
abstract IntegerValue |
integerAt(int index)
Fetch an integer value at the specified index. |
void |
storeAll(Heaper value,
int count,
int start)
Fill a consequitive range of elements with the supplied value. |
abstract void |
storeInteger(int index,
IntegerValue value)
Store an integer value at the specified index. |
protected void |
subtractData(int start,
PrimArithmeticArray other,
int otherStart,
int count)
Subtract the respective elements of other from this over the given index range. |
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.PrimArithmeticArray |
addElements, addElements, addElements, compare, compare, compare, compare, contentsEqual, elementsEqual, signOfNonZeroAfter, subtractElements, subtractElements, subtractElements |
| Methods inherited from class org.abora.white.collection.arrays.PrimArray |
contentsHash, copy, copy, copy, copy, copy, copyElements, copyGrow, count, elementsEqual, elementsEqual, elementsHash, elementsHash, fetchValue, getValue, indexOf, indexOf, indexOfElements, indexOfElements, indexOfElements, indexOfElements, indexOfElements, indexPast, indexPast, isEqual, makeNew, printElementOn, printOn, spec, storeAll, storeAll, storeMany, storeMany, storeMany, storeValue, 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 |
| Constructor Detail |
protected PrimIntegerArray()
| Method Detail |
public abstract void storeInteger(int index,
IntegerValue value)
value at the specified index.
index - index in array the element will be stored at.value - integer to store in this.
java.lang.IllegalArgumentException - if value can not be held by arraypublic abstract IntegerValue integerAt(int index)
index.
index - index in array whose element will be returned
index.
public PrimIntegerArray hold(int index,
IntegerValue value,
boolean canModify)
value at the specified index.
If index is past the end of the current array, then
return a copy of the array that has been extended to include the specified index.
Fill new intervening elements with zero.
If value can not be held by the current array, then return
a copy of the array of a kind that can hold the value.
If canModify and the value can be stored in the current array
then modify this array, otherwise in all other cases return a copy of the
this array.
index - index in array the element will be stored at.value - integer to store in arraycanModify - true if the the value can be stored in this array,
if possible, otherwise always return a copy of this array.
value, may be this array or a copy.
public PrimIntegerArray hold(int index,
IntegerValue value)
public int indexOf(Heaper value,
int start,
int n)
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 indexOfInteger(IntegerValue value,
int start,
int nth)
public int indexOfInteger(IntegerValue value,
int start)
public int indexOfInteger(IntegerValue value)
public int indexPast(Heaper value,
int start,
int n)
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 indexPastInteger(IntegerValue value,
int start,
int nth)
public int indexPastInteger(IntegerValue value,
int start)
public int indexPastInteger(IntegerValue 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.
protected int compareData(int here,
PrimArithmeticArray other,
int there,
int count)
PrimArithmeticArray
compareData in class PrimArithmeticArray
public int elementsHash(int count,
int start)
PrimArray
elementsHash in class PrimArrayprotected Heaper zeroElement()
PrimArray
zeroElement in class PrimArray
protected void addData(int start,
PrimArithmeticArray other,
int otherStart,
int count)
PrimArithmeticArrayNote that arithmetic overflows aren't faulted.
Subclasses should override.
addData in class PrimArithmeticArray
protected void subtractData(int start,
PrimArithmeticArray other,
int otherStart,
int count)
PrimArithmeticArrayNote that arithmetic overflows aren't faulted.
Subclasses should override.
subtractData in class PrimArithmeticArray
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||