|
||||||||
| 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.value.PrimSpec
A specification of a kind of primitive data type which can be stored in PrimArrays. It gives you protocol for creating and copying PrimArrays. The class and characteristics of this object determine what kind of things are stored there, and how much precision they have.
| Field Summary | |
protected java.lang.Class |
arrayClass
|
| Constructor Summary | |
protected |
PrimSpec(java.lang.Class arrayClass)
Construct a new specification. |
| Method Summary | |
int |
actualHashForEqual()
Defined by subclasses to produce the value returned by hashForEqual. |
PrimArray |
array()
Return an empty array suitable for holding elements that match this specification. |
PrimArray |
array(int count)
Return an array suitable for holding the specified count
number of elements that match this specification. |
protected java.lang.Class |
arrayClass()
|
abstract PrimArray |
arrayFromBuffer(java.lang.Object buffer)
Return an array holding a copy of the given elements of buffer suitable for this spec. |
PrimArray |
arrayWith(Heaper value)
Return an array holding the single element containing the given value. |
PrimArray |
arrayWithThree(Heaper value,
Heaper other,
Heaper another)
Return an array holding three elements containing the given values in the same order. |
PrimArray |
arrayWithTwo(Heaper value,
Heaper other)
Return an array holding two elements containing the given values in the same order. |
PrimArray |
copy(PrimArray array)
|
PrimArray |
copy(PrimArray array,
int count)
|
PrimArray |
copy(PrimArray array,
int count,
int start)
|
PrimArray |
copy(PrimArray array,
int count,
int start,
int before)
|
PrimArray |
copy(PrimArray array,
int count,
int start,
int before,
int after)
Make a copy of an array with a different representation size. |
PrimArray |
copyGrow(PrimArray array,
int after)
Make a copy of the array into a larger array. |
static PrimFloatSpec |
iEEE(int bitCount)
Return the specification suitable for floating-point numbers of the specified bitCount in size. |
static PrimFloatSpec |
iEEE32()
Return the specification defining IEEE32 floating-point numbers. |
static PrimFloatSpec |
iEEE64()
Return the specification defining IEEE64 floating-point numbers. |
static PrimIntegerSpec |
int16()
Return the specification defining signed 16-bit integer numbers. |
static PrimIntegerSpec |
int32()
Return the specification defining signed 32-bit integer numbers. |
static PrimIntegerSpec |
int64()
Return the specification defining signed 64-bit integer numbers. |
static PrimIntegerSpec |
int8()
Return the specification defining signed 8-bit integer numbers. |
static PrimIntegerSpec |
integerVar()
Return the specification defining signed unlimited size integer numbers. |
static PrimPointerSpec |
pointer()
Return the specification defining pointers to Heaper obects. |
protected abstract PrimArray |
privateCopy(PrimArray array,
int size,
int start,
int count,
int offset)
Support for copy:with:with:with:with: |
static PrimPointerSpec |
sharedPointer()
Return the specification defining pointers to Heaper obects where a count of the number of shared users are kept. |
static PrimIntegerSpec |
signedInteger(int bitCount)
Return the specification suitable for signed integer numbers of the specified bitCount in size. |
static PrimIntegerSpec |
toHold(IntegerValue value)
Return the least demanding integer spec that will hold value. |
static PrimIntegerSpec |
uInt16()
Return the specification defining un-signed 16-bit integer numbers. |
static PrimIntegerSpec |
uInt32()
Return the specification defining un-signed 32-bit integer numbers. |
static PrimIntegerSpec |
uInt8()
Return the specification defining un-signed 8-bit integer numbers. |
static PrimIntegerSpec |
unsignedInteger(int bitCount)
Return the specification suitable for un-signed integer numbers of the specified bitCount in size. |
| Methods inherited from class org.abora.white.xpp.basic.Heaper |
destroy, destruct, equals, hashForEqual, isEqual, printContentsOn, printOn, sendSelfTo, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.Class arrayClass
| Constructor Detail |
protected PrimSpec(java.lang.Class arrayClass)
arrayClass - the type of PrimArray used to hold values that
meet this specification| Method Detail |
public static PrimFloatSpec iEEE32()
public static PrimFloatSpec iEEE64()
public static PrimFloatSpec iEEE(int bitCount)
bitCount in size.
An exact size match is required.
bitCount - number of bits the specifications values have..
java.lang.UnsupportedOperationException - if the specified bitCount can not be precisely matched.public static PrimIntegerSpec integerVar()
public static PrimIntegerSpec int8()
public static PrimIntegerSpec int16()
public static PrimIntegerSpec int32()
public static PrimIntegerSpec int64()
public static PrimIntegerSpec signedInteger(int bitCount)
bitCount in size.
An exact size match is required.
bitCount - number of bits the specifications values have..
java.lang.UnsupportedOperationException - if the specified bitCount is not available.public static PrimIntegerSpec uInt8()
public static PrimIntegerSpec uInt16()
public static PrimIntegerSpec uInt32()
public static PrimIntegerSpec unsignedInteger(int bitCount)
bitCount in size.
An exact size match is required.
bitCount - number of bits the specifications values have..
java.lang.UnsupportedOperationException - if the specified bitCount is not available.public static PrimIntegerSpec toHold(IntegerValue value)
value.
value - integer value to test against.
public static PrimPointerSpec pointer()
public static PrimPointerSpec sharedPointer()
protected java.lang.Class arrayClass()
public PrimArray array(int count)
count
number of elements that match this specification. Elements
should be initialized to some reasonable zero/null value.
count - number of elements this will be able to hold
public PrimArray array()
this specification.
public abstract PrimArray arrayFromBuffer(java.lang.Object buffer)
buffer - Java array containing elements meeting this specification.
public PrimArray arrayWith(Heaper value)
value.
public PrimArray arrayWithTwo(Heaper value,
Heaper other)
value - first value to store in array.other - second value to store in array.
public PrimArray arrayWithThree(Heaper value,
Heaper other,
Heaper another)
value - first value to store in array.other - second value to store in array.another - third value to store in array.
public PrimArray copy(PrimArray array)
public PrimArray copy(PrimArray array,
int count)
public PrimArray copy(PrimArray array,
int count,
int start)
public PrimArray copy(PrimArray array,
int count,
int start,
int before)
public PrimArray copy(PrimArray array,
int count,
int start,
int before,
int after)
public PrimArray copyGrow(PrimArray array,
int after)
protected abstract PrimArray privateCopy(PrimArray array,
int size,
int start,
int count,
int offset)
public int actualHashForEqual()
Heaper
actualHashForEqual in class Heaper
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||