org.abora.gold.collection.basic
Class PrimDataArray

java.lang.Object
  |
  +--org.abora.gold.java.AboraHeaper
        |
        +--org.abora.gold.xpp.basic.Heaper
              |
              +--org.abora.gold.collection.basic.PrimArray
                    |
                    +--org.abora.gold.collection.basic.PrimDataArray
Direct Known Subclasses:
PrimFloatArray, PrimIntegerArray

public class PrimDataArray
extends PrimArray

A common superclass for primitive arrays of basic data types (i.e. bits of some kind)


Field Summary
 
Fields inherited from class org.abora.gold.collection.basic.PrimArray
OurGutsCount
 
Fields inherited from class org.abora.gold.xpp.basic.Heaper
AllBlasts, BecomeMap, GarbageCount, InGC, InitializedClasses, InitializingClasses, LastMemory, NextClientRequestNumber, NotOneElementSignal, PackageTable, PromiseNameTable, StringHashSBoxes
 
Fields inherited from class org.abora.gold.java.AboraHeaper
ActiveClubs, CurrentAuthor, CurrentBertCanopyCache, CurrentBertCrum, CurrentChunk, CurrentGrandMap, CurrentKeyMaster, CurrentPacker, CurrentSensorCanopyCache, CurrentServer, CurrentSession, CurrentSessions, CurrentTrace, InitialEditClub, InitialOwner, InitialReadClub, InitialSponsor, InsideTransactionFlag
 
Constructor Summary
protected PrimDataArray(int count, int datumSize)
           
 
Method Summary
protected  void addData(int myStart, PrimDataArray other, int otherStart, int count)
          Add the respective elements of other to this over the given index range.
 void addElements(int to, PrimDataArray other)
           
 void addElements(int to, PrimDataArray other, int count)
           
 void addElements(int to, PrimDataArray other, int count, int from)
           
 int compare(PrimDataArray other)
           
 int compare(PrimDataArray other, int count)
           
 int compare(PrimDataArray other, int count, int here)
           
 int compare(PrimDataArray other, int count, int here, int there)
          Return -1, 0, or +1 according to whether the elements in the specified span of this array are lexically less than, equal to, or greater than the specified span of the other.
protected  int compareData(int myStart, PrimDataArray other, int otherStart, int count)
          over given range, returns - if this < other; 0 if this == other; + if this > other.
 BooleanVar contentsEqual(PrimArray other)
          Whether the two ranges contain semantically the same values.
 void copyToBuffer(int[] buffer, int size, int count, int start)
          Copy of a piece of this array into the provided buffer with size bytes of space available.
 BooleanVar 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
 Heaper fetchValue(int index)
          Fetch a value; may be a Heaper, NULL, or a PrimValue as appropriate to PrimArray subclass.
 int indexOf(Heaper value, int start, int n)
          The index of the nth occurrence of the given value at or after (before if n is negative) the given index, or -1 if there is none.
 int indexPast(Heaper value, int start, int n)
          The index of the nth occurrence of anything but the given value at or after (before if n is negative) the given index, or -1 if there is none.
protected  PrimArray makeNew(int size, PrimArray source, int sourceOffset, int count, int destOffset)
           
protected  void printElementOn(int index, Stream oo)
           
protected  int signOfNonZeroAfter(int start)
          return the sign of the next non-zero element after start, or 0 if no such element.
 PrimSpec spec()
          A description of the kinds of things which can be stored in this array
 void storeAll(Heaper value, int count, int start)
          Set a range of elements to have the same value
 void storeValue(int index, Heaper value)
          Store a value; may be a Heaper, NULL, or a PrimValue as appropriate to PrimArray subclass.
protected  void subtractData(int myStart, PrimDataArray other, int otherStart, int count)
          Subtract the respective elements of other from this over the given index range.
 void subtractElements(int to, PrimDataArray other)
           
 void subtractElements(int to, PrimDataArray other, int count)
           
 void subtractElements(int to, PrimDataArray other, int count, int from)
           
 
Methods inherited from class org.abora.gold.collection.basic.PrimArray
cleanup, contentsHash, copy, copy, copy, copy, copy, copyElements, copyGrow, copyToBuffer, copyToBuffer, count, elementsEqual, elementsEqual, elementsHash, elementsHash, getValue, indexOf, indexOf, indexOfElements, indexOfElements, indexOfElements, indexOfElements, indexOfElements, indexPast, indexPast, moveTo, outOfBounds, printElementOn, printOn, rangeCheck, size, storage, storeAll, storeAll, storeAll, storeMany, storeMany, storeMany, zeroElements, zeroElements, zeroElements
 
Methods inherited from class org.abora.gold.xpp.basic.Heaper
abstractDeclarationFor, abstractTypeFor, actualHashForEqual, addMethodAttributeToInOf, addPackage, addPackageCategory, allClientProtocolOn, argumentTypesFor, arrow, blast, blast, BLAST, cachePromiseNameTable, cachePromiseNameTableIn, canYouBecome, cast, cleanPromiseClasses, cleanupGarbage, clientClassesDo, clientFunctionsOn, clientMethodsOn, clientProtocol, clientProtocolDo, clientProtocolOn, clientProtocolOn, collectibleClasses, compare, compileClientSubclasses, compileConstantPromiseMethods, compileCreateFromRcvr, compileEQ, compileGeneratedClassMethod, compileGeneratedMethod, compileHook, compilePromise, compilePromiseDefaultMethods, compilePromiseFluidDeclarations, compilePromiseHandlers, compilePromiseMethods, compileRequestCreateMsgInArguments, compileRequestEvaluateMsgInReturningArguments, compileRPCSpecialistEvaluateMsgForReturningArguments, compileSendSelfTo, compileSendSelfToSendHook, compileStubbleMethods, compileSubclassStubbleMethods, computeMangle, computePreorder, constantTypeValue, convert, convertCopyDeclarations, convertDeferredDeclarations, convertProxyDeclarations, convertSubclassCopyDeclarations, convertSubclassDeferredDeclarations, convertSubclassProxyDeclarations, copyReferencesToType, create, create, create, create, create, create, create, create, create, create, createRequestClassArguments, definesProxyMethods, delete, deref, destroy, destruct, destructor, enum, enumFlags, equals, exportName, fetchAttribute, fetchPackage, fetchSuperCategory, fileOutClientProtocol, findCategory, findSenderAndReceiverMethods, findTailInto, flushPromiseNameTable, foo, freezeClientClasses, freezeClientProtocol, freezeStProtocol, frozenClasses, garbageCollect, garbageCollectFrom, gcOpportunity, gcOpportunity, generatedCategory, generatePromiseNames, getCategory, getOrMakePackage, getSuperCategory, handlerSignaturesFrom, hash, hashForEqual, hasProxyMethods, info_clientClasses, info_clientSideClasses, info_promiseClasses, info_stProtocol, inGC, initializedClasses, initializingClasses, initPackages, initStringHashSBoxes, inspectPieces, instanceSize, IntegerVar, isByProxy, isConstructed, isDestructed, isEqual, isEqualOrSubclassOf, isGenerated, isIntType, isKindOf, isRawType, isUnlocked, linkTimeNonInherited, make, makeClassTable, makeFillTable, makeRequestTable, mangle, markChildren, markCount, markInstances, mayBecome, mayBecomeAnySubclassOf, new1, newX, nonCopyVariables, notWorking, pack, packageClasses, packagingCategory, parseExportName, passe, pointerToStaticMember, pointerToStaticMember, pointerToVirtualMember, preorderMax, preorderNumber, PROBLEM, problems, promiseClass, promiseDefaultValue, promiseName, promiseNameTable, promiseToAbstract, registerPackageCategory, removeGeneratedCode, removeStubbleMethods, removeSubclassGeneratedCode, removeSubclassStubbleMethods, requestProcedure, requestProceduresFrom, returnTypeFor, rootName, scheduleTermination, sendProxyTo, sendSelfTo, serverNameFor, setGC, signal, signals, smalltalkSelector, stClientProtocol, stubbleSelectorTokenReturnsArguments, subclassNonCopyVariables, takeOop, togglePromiseName, togglePromiseOfParse, unimplemented, unmangle, verifyFreeze, wipeStubble
 
Methods inherited from class org.abora.gold.java.AboraHeaper
asOop, basicInspect, displayString, error, hack, halt, inspect, knownBug, mightNotImplement, REQUIRES, shouldImplement, shouldNotImplement, stubbleForSubclassResponsibility, thingToDo, willNotImplement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrimDataArray

protected PrimDataArray(int count,
                        int datumSize)
Method Detail

storeValue

public void storeValue(int index,
                       Heaper value)
Description copied from class: PrimArray
Store a value; may be a Heaper, NULL, or a PrimValue as appropriate to PrimArray subclass. It is expected that most PrimArray clients will want to use less abstract access methods

Overrides:
storeValue in class PrimArray

fetchValue

public Heaper fetchValue(int index)
Description copied from class: PrimArray
Fetch a value; may be a Heaper, NULL, or a PrimValue as appropriate to PrimArray subclass. It is expected that most PrimArray clients will want to use less abstract access methods.

Overrides:
fetchValue in class PrimArray

spec

public PrimSpec spec()
Description copied from class: PrimArray
A description of the kinds of things which can be stored in this array

Overrides:
spec in class PrimArray

contentsEqual

public BooleanVar contentsEqual(PrimArray other)
Description copied from class: PrimArray
Whether the two ranges contain semantically the same values. Two non-NULL pointers match iff the Heapers they point to are isEqual. Two integers match iff they have the same value, even though they may be represented as different sizes. Two floats likewise.

Overrides:
contentsEqual in class PrimArray

addElements

public void addElements(int to,
                        PrimDataArray other,
                        int count,
                        int from)

addElements

public void addElements(int to,
                        PrimDataArray other,
                        int count)

addElements

public void addElements(int to,
                        PrimDataArray other)

subtractElements

public void subtractElements(int to,
                             PrimDataArray other,
                             int count,
                             int from)

subtractElements

public void subtractElements(int to,
                             PrimDataArray other,
                             int count)

subtractElements

public void subtractElements(int to,
                             PrimDataArray other)

indexOf

public int indexOf(Heaper value,
                   int start,
                   int n)
Description copied from class: PrimArray
The index of the nth occurrence of the given value at or after (before if n is negative) the given index, or -1 if there is none.

Overrides:
indexOf in class PrimArray

indexPast

public int indexPast(Heaper value,
                     int start,
                     int n)
Description copied from class: PrimArray
The index of the nth occurrence of anything but the given value at or after (before if n is negative) the given index, or -1 if there is none.

Overrides:
indexPast in class PrimArray

storeAll

public void storeAll(Heaper value,
                     int count,
                     int start)
Description copied from class: PrimArray
Set a range of elements to have the same value

Overrides:
storeAll in class PrimArray

copyToBuffer

public void copyToBuffer(int[] buffer,
                         int size,
                         int count,
                         int start)
Description copied from class: PrimArray
Copy of a piece of this array into the provided buffer with size bytes of space available. The default is to start at the beginning and go to the end. The elements will be copied from this array beginning with start, and taking as many of count elements or upto the end of this array as will fit in size bytes. WARNING: Note that if this array is a PtrArray, the pointers copied to buffer will not be considered as references for garbage collection. Therefore the buffer should not be allowed to contain the only pointer to an object in a garbage collecting environment.

Overrides:
copyToBuffer in class PrimArray

compare

public int compare(PrimDataArray other,
                   int count,
                   int here,
                   int there)
Return -1, 0, or +1 according to whether the elements in the specified span of this array are lexically less than, equal to, or greater than the specified span of the other. The other array must be of a compatible type. If the count is negative or goes beyond the end of either array, then the shorter array is considered to be extended with zeros. NOTE: Because of zero extension, this is not the same as elementsEqual; it is possible that a->compare (b) == 0 even though ! a->contentsEqual (b)


compare

public int compare(PrimDataArray other,
                   int count,
                   int here)

compare

public int compare(PrimDataArray other,
                   int count)

compare

public int compare(PrimDataArray other)

elementsEqual

public BooleanVar elementsEqual(int here,
                                PrimArray other,
                                int there,
                                int count)
Description copied from class: PrimArray
Whether the two ranges contain the same values, using the criteria defined in contentsEqual

Overrides:
elementsEqual in class PrimArray

elementsHash

public int elementsHash(int count,
                        int start)
A hash of the range of values out of the array

Overrides:
elementsHash in class PrimArray

compareData

protected int compareData(int myStart,
                          PrimDataArray other,
                          int otherStart,
                          int count)
over given range, returns - if this < other; 0 if this == other; + if this > other.


signOfNonZeroAfter

protected int signOfNonZeroAfter(int start)
return the sign of the next non-zero element after start, or 0 if no such element. Note that for the unsigned arrays, this will only return 0 or 1.


addData

protected void addData(int myStart,
                       PrimDataArray other,
                       int otherStart,
                       int count)
Add the respective elements of other to this over the given index range.


subtractData

protected void subtractData(int myStart,
                            PrimDataArray other,
                            int otherStart,
                            int count)
Subtract the respective elements of other from this over the given index range.


printElementOn

protected void printElementOn(int index,
                              Stream oo)

makeNew

protected PrimArray makeNew(int size,
                            PrimArray source,
                            int sourceOffset,
                            int count,
                            int destOffset)
Overrides:
makeNew in class PrimArray


Translation - Copyright © 2003 David G Jones. All Rights Reserved.
Original Udanax-Gold - Copyright © 1979-1999 Udanax.com. All rights reserved.