public class GbjCollection extends GbjObject
Constructor and Description |
---|
GbjCollection() |
Modifier and Type | Method and Description |
---|---|
Object |
add(Object obj)
add the object to the receiver, returning the object.
|
GbjCollection |
addAll(GbjCollection obj)
Add the contents of the given collection to the receiver, returning the arg.
|
Object |
addAll(Object[] obj)
Add the contents of the given collection to the receiver, returning the arg.
|
GbjObject[] |
allElements()
Returns an array holding all of the server collection's contents.
|
GbjCollection |
asArray()
Create an extensible array with the contents of the server object
|
GbjCollection |
asBag()
Create a Bag with the contents of the server object
|
GbjCollection |
asByteArray()
Create a ByteArray with the contents of the server object (must hold bytes or chars)
|
GbjCollection |
asIdentityBag()
Create an identity bag with the contents of the server object
|
GbjCollection |
asIdentitySet()
Create an identity set with the contents of the server object
|
GbjCollection |
asOrderedCollection()
Create an ordered collection with the contents of the server object
|
GbjCollection |
asSet()
Create a set with the contents of the server object
|
GbjCollection |
asSortedCollection()
Sort the server object according to <=
|
GbjCollection |
asSortedCollection(String sortBlock)
Use the given Smalltalk block to sort the server object.
|
GbjCollection |
asSortedOrderedCollection()
Create an ordered collection with the sorted contents of the server object
|
GbjCollection |
collect(String collectBlock)
Evaluate the given block with each element of the server object returning
a collection, usually of the same kind, with the results.
|
GbjObject |
detect(String detectBlock)
Find the first element in the server enumeration that satisfies the
given block.
|
Enumeration |
elements()
Returns an Enumeration of the server object's contents.
|
void |
exclusiveLockContents()
lock the contents of this collection.
|
int |
identicalOccurrencesOf(GbjObject anObject)
Return the number of occurrences of the given object in the server object
|
boolean |
includes(GbjObject anObject)
Answer whether an object equal to the argument is in the server object
|
boolean |
includesIdentical(GbjObject anObject)
Answer whether the argument is in the server object
|
boolean |
includesValue(GbjObject anObject)
Answer whether an object equal to the argument is in the server object
|
GbjObject |
injectInto(GbjObject arg,
String block)
Evaluate the given block with the given argument plus an element of
the server object.
|
boolean |
isEmpty()
Does the server object hold anything?
|
int |
occurrencesOf(GbjObject anObject)
Return the number of occurrences of the given object's value in the server object
|
void |
readLockContents()
lock the contents of this collection.
|
GbjCollection |
reject(String rejectBlock)
Return a collection of all the elements of the server object that do not
satisfy the given block
|
GbjObject |
remove(GbjObject obj)
Remove the given object's value from the server object, throwing an error
if not found
|
GbjObject |
removeAll(GbjCollection obj)
Remove the given collection's values from the server object, throwing an error
if not found
|
GbjObject |
removeAllIdentical(GbjCollection obj)
Remove the given objects from the server object, throwing an error if not found
|
GbjObject |
removeIdentical(GbjObject obj)
Remove the given object from the server object, throwing an error if not found
|
void |
removeLocksOnContents()
release locks held on the contents of this collection.
|
GbjObject |
removeValue(GbjObject obj)
Remove the given object's value from the server object, throwing an error
if not found
|
GbjCollection |
select(String selectBlock)
Return a collection of all the elements of the server object that
satisfy the given block
|
GbjCollection |
sortAscending()
Return an array of the server sorted values
|
GbjCollection |
sortAscending(String variableName)
Sort the server object on the given instance variable
|
GbjCollection |
sortDescending()
Return an array of the server sorted values
|
GbjCollection |
sortDescending(String variableName)
Sort the server object on the given instance variable
|
GbjCollection |
sortWith(String specs)
Sort the server object using the given GemStone sort specification
|
void |
writeLockContents()
lock the contents of this collection.
|
assignToSegment, asString, at, atPut, cachedValue, canBeWritten, changeToSegment, cluster, clusterBucket, clusterDepthFirst, dbStringBufferValue, dbStringValue, deepCopy, exclusiveLock, execute, fromInteger, fromLong, getSession, immediateInvariant, in, isBehavior, isCommitted, isConnected, isInvariant, isKindOf, isMemberOf, isNil, isWritten, moveToDisk, namedInstanceVariables, nilFields, notNil, page, pageCreationTime, perform, printString, readLock, remoteClass, remoteClone, remoteCopy, remoteEquals, remoteEqualsIdentical, remoteEqualsNoCase, remoteHash, remoteIdentityHash, remoteIsEquivalent, remoteSize, remoteSpecies, removeLock, respondsTo, segment, sendMsg, sendMsg, sendMsg, sendMsg, sendMsg, sendMsg, size, stringBufferValue, withOop, writeLock
booleanValue, bytesValue, byteValue, calendarValue, charValue, dateValue, debugPrint, doubleValue, equals, floatValue, getByte, getBytes, getIndexedSize, getNamedObj, getNamedObjs, getNamedSize, getObj, getObjs, getObjs, getObjType, getTotalSize, getValType, hashCode, intValue, isString, longValue, named, putByte, putBytes, putBytes, putNamedObj, putNamedObjs, putNamedObjs, putObj, putObjs, putObjs, shortValue, stringValue, toString, withOop
clone, getOop, isSpecial
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
public Enumeration elements()
public GbjObject[] allElements()
public Object add(Object obj) throws GbjException
obj
- - a GbjObject instance or an object that the interface can
convert to a server objectGbjException
- thrown if there is a server exceptionpublic GbjCollection addAll(GbjCollection obj) throws GbjException
obj
- - a GbjCollection of server objectsGbjException
- thrown if there is a server exceptionpublic Object addAll(Object[] obj) throws GbjException
obj
- - a Java array of GbjObjects or objects that can be converted to server objectsGbjException
- thrown if there is a server exceptionpublic GbjCollection asArray() throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection asBag() throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection asByteArray() throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection asIdentityBag() throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection asIdentitySet() throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection asOrderedCollection() throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection asSet() throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection asSortedCollection() throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection asSortedCollection(String sortBlock) throws GbjException
[:a:b | a address street <= b address street ]
GbjException
- thrown if there is a server exceptionpublic GbjCollection asSortedOrderedCollection() throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection collect(String collectBlock) throws GbjException
collect("[:each | each segment owner userId]")
GbjException
- thrown if there is a server exceptionpublic GbjObject detect(String detectBlock) throws GbjException
detect("[:each | each segment owner userId = #DataCurator]")
GbjException
- thrown if there is a server exceptionpublic int identicalOccurrencesOf(GbjObject anObject) throws GbjException
GbjException
- thrown if there is a server exceptionpublic boolean includes(GbjObject anObject) throws GbjException
GbjException
- thrown if there is a server exceptionpublic boolean includesIdentical(GbjObject anObject) throws GbjException
GbjException
- thrown if there is a server exceptionpublic boolean includesValue(GbjObject anObject) throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjObject injectInto(GbjObject arg, String block) throws GbjException
coll.injectInto(GbjGetSession().GSOne, "[:v:e | v+e]").intValue()
GbjException
- thrown if there is a server exceptionpublic boolean isEmpty() throws GbjException
GbjException
- thrown if there is a server exceptionpublic int occurrencesOf(GbjObject anObject) throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection reject(String rejectBlock) throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjObject remove(GbjObject obj) throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjObject removeIdentical(GbjObject obj) throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjObject removeValue(GbjObject obj) throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjObject removeAll(GbjCollection obj) throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjObject removeAllIdentical(GbjCollection obj) throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection select(String selectBlock) throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection sortAscending() throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection sortDescending() throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection sortAscending(String variableName) throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection sortDescending(String variableName) throws GbjException
GbjException
- thrown if there is a server exceptionpublic GbjCollection sortWith(String specs) throws GbjException
GbjException
- thrown if there is a server exceptionpublic void readLockContents() throws GbjException
GbjException
- thrown if there is a server exceptionGbjGemStoneErrors.LOCK_ERR_INCOMPLETE
public void writeLockContents() throws GbjException
GbjException
- thrown if there is a server exceptionGbjGemStoneErrors.LOCK_ERR_INCOMPLETE
public void exclusiveLockContents() throws GbjException
GbjException
- thrown if there is a server exceptionGbjGemStoneErrors.LOCK_ERR_INCOMPLETE
public void removeLocksOnContents() throws GbjException
GbjException
- thrown if there is a server exception