|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
wt.fc.collections.AbstractWTCollection
Base class for default collection implementations. The add() methods
throw UnsupportedOperationExceptions.
Supported API: false
Extendable: false
Nested Class Summary | |
(package private) class |
AbstractWTCollection.PersistableCollection
|
Field Summary | |
private static String |
CLASSNAME
|
private WTReference |
lastReturnedReference
Non thread-safe reference to last object returned by persistableIterator, queryKeyIterator, referenceIterator. |
private ReferenceMap.IteratorListener |
listener
Lazily initialized listener that updates lastReturnedReference when an iterator returns an object |
private static String |
RESOURCE
|
Fields inherited from interface wt.fc.collections.WTCollection |
DEFLATED_ON_SERIALIZATION |
Constructor Summary | |
AbstractWTCollection()
|
Method Summary | |
boolean |
add(Object o)
Supported API: false |
boolean |
add(Persistable p)
Supported API: false |
boolean |
add(QueryKey query_key)
Supported API: false |
boolean |
add(WTReference ref)
Supported API: false |
boolean |
addAll(Collection c)
Supported API: false |
boolean |
addAll(QueryResult qr)
Supported API: false |
abstract Iterator |
classIterator()
Supported API: false |
boolean |
connect(Persistable p,
WTCollection source)
Supported API: false |
boolean |
connect(Persistable p,
WTCollection source,
boolean add_if_not_present)
Connects the given object from the source collection to this collection. |
boolean |
connect(QueryKey query_key,
WTCollection source)
Supported API: false |
boolean |
connect(QueryKey query_key,
WTCollection source,
boolean add_if_not_present)
Connects the given object from the source collection to this collection. |
(package private) abstract boolean |
connect(WTReference r,
boolean add)
Add the reference to the collection's internal data structures |
boolean |
connect(WTReference ref,
WTCollection source)
Supported API: false |
boolean |
connect(WTReference ref,
WTCollection source,
boolean add_if_not_present)
Connects the given object from the source collection to this collection. |
boolean |
connectAll(WTCollection c)
Supported API: false |
boolean |
connectAll(WTCollection source,
boolean add_if_not_present)
Connects the elements in the source collection to this collection. |
boolean |
contains(Object o)
Supported API: false |
boolean |
contains(Persistable p)
Supported API: false |
boolean |
contains(QueryKey query_key)
Supported API: false |
boolean |
contains(WTReference ref)
Supported API: false |
boolean |
containsInstance(Class filter)
Supported API: false |
protected boolean |
containsNonPersisted(Persistable p)
Attempts to remove the given non-persisted Persistable from the collection. |
boolean |
containsOnly(Class filter)
Determines whether this collection only contains objects that are assignable from the given filter. |
void |
deflate()
Supported API: false |
boolean |
equals(Object o)
|
(package private) ReferenceMap.IteratorListener |
getIteratorListener()
Lazily initializes sourceCollectionIteratorListener |
abstract int |
getKeyMask()
Supported API: false |
protected WTReference |
getLastReturnedReference()
Get a reference to the object last returned by one of the collection's iterators. |
WTReference |
getReference(Persistable p)
Get a reference used internally by this collection that refers to the given Persistable. |
WTReference |
getReference(QueryKey q)
Get a reference used internally by this collection that refers to the given QueryKey. |
WTReference |
getReference(WTReference r)
Get a reference used internally by this collection that refers to the same object as the given reference. |
WTReference[] |
getReferences(WTReference r)
Get all reference used internally by this collection that refer to the same object as the given reference. |
int |
hashCode()
|
void |
inflate()
Supported API: false |
boolean |
isDeflatedOnSerialization()
Gets the value of the attribute: deflatedOnSerialization. |
boolean |
isEnabled(int mask)
Supported API: false |
Iterator |
iterator()
Supported API: false |
Collection |
persistableCollection()
Provides a Persistable-based view of the objects in this WTCollection. |
abstract Iterator |
persistableIterator()
Supported API: false |
abstract Iterator |
persistableIterator(Class filter,
boolean include_subclasses)
Supported API: false |
abstract Iterator |
queryKeyIterator()
Supported API: false |
abstract Iterator |
queryKeyIterator(Class filter,
boolean include_subclasses)
Supported API: false |
(package private) void |
referenceAdded(WTReference r)
|
abstract Iterator |
referenceIterator()
Supported API: false |
abstract Iterator |
referenceIterator(Class filter,
boolean include_subclasses)
Supported API: false |
(package private) void |
referenceRemoved(WTReference r)
|
boolean |
remove(Object o)
Supported API: false |
boolean |
remove(Persistable p)
Supported API: false |
boolean |
remove(QueryKey query_key)
Supported API: false |
boolean |
remove(WTReference ref)
Supported API: false |
boolean |
removeAll(Class filter,
boolean include_subclasses)
Supported API: false |
protected boolean |
removeNonPersisted(Persistable p)
Attempts to remove the given non-persisted Persistable from the collection. |
boolean |
retainAll(Class filter,
boolean include_subclasses)
Supported API: false |
void |
setDeflatedOnSerialization(boolean a_DeflatedOnSerialization)
Sets the value of the attribute: deflatedOnSerialization. |
protected void |
setLastReturnedReference(WTReference r)
Set a reference to the object last returned by one of the collection's iterators. |
WTCollection |
subCollection(Class filter)
Supported API: false |
abstract WTCollection |
subCollection(Class filter,
boolean include_subclasses)
Supported API: false |
Object[] |
toArray()
Supported API: false |
long[] |
toArray(long[] array)
Supported API: false |
Object[] |
toArray(Object[] array)
Supported API: false |
Persistable[] |
toArray(Persistable[] array)
Supported API: false |
QueryKey[] |
toArray(QueryKey[] array)
Supported API: false |
WTReference[] |
toArray(WTReference[] array)
Supported API: false |
long[] |
toIdArray()
Supported API: false |
Methods inherited from class java.util.AbstractCollection |
clear, containsAll, isEmpty, removeAll, retainAll, size, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
clear, containsAll, isEmpty, removeAll, retainAll, size |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private transient WTReference lastReturnedReference
private transient ReferenceMap.IteratorListener listener
Constructor Detail |
public AbstractWTCollection()
Method Detail |
public boolean isDeflatedOnSerialization()
isDeflatedOnSerialization
in interface WTCollection
public void setDeflatedOnSerialization(boolean a_DeflatedOnSerialization) throws WTPropertyVetoException
setDeflatedOnSerialization
in interface WTCollection
a_DeflatedOnSerialization
-
WTPropertyVetoException
public boolean add(Object o)
add
in interface WTCollection
o
-
public boolean add(Persistable p)
add
in interface WTCollection
p
-
public boolean add(QueryKey query_key)
add
in interface WTCollection
query_key
-
public boolean add(WTReference ref)
add
in interface WTCollection
ref
-
public boolean addAll(Collection c)
addAll
in interface WTCollection
c
-
public boolean addAll(QueryResult qr)
addAll
in interface WTCollection
qr
-
public abstract Iterator classIterator()
classIterator
in interface WTCollection
public boolean connect(Persistable p, WTCollection source)
connect
in interface WTCollection
p
- source
-
WTCollection.connect(Persistable,WTCollection,boolean)
public boolean connect(QueryKey query_key, WTCollection source)
connect
in interface WTCollection
query_key
- source
-
WTCollection.connect(QueryKey,WTCollection,boolean)
public boolean connect(WTReference ref, WTCollection source)
connect
in interface WTCollection
ref
- source
-
WTCollection.connect(WTReference,WTCollection,boolean)
public boolean connectAll(WTCollection c)
connectAll
in interface WTCollection
c
-
public boolean connect(Persistable p, WTCollection source, boolean add_if_not_present)
add_if_not_present
is true
, then if the object does not exist yet in this
collection, it is added to it.
connect
in interface WTCollection
p
- source
- add_if_not_present
- When true
, the object is added to this collection if it isn't currently contained by it.
IllegalArgumentException
- If the source does not have the same
key type as this collection
ClassCastException
- If this collection does not support connection
with the source's implementation of WTCollection.connect(Persistable,WTCollection,boolean)
public boolean connect(QueryKey query_key, WTCollection source, boolean add_if_not_present)
add_if_not_present
is true
, then if the object does not exist yet in this
collection, it is added to it.
connect
in interface WTCollection
query_key
- source
- add_if_not_present
- When true
, the object is added to this collection if it isn't currently contained by it.
IllegalArgumentException
- If the source does not have the same
key type as this collection
ClassCastException
- If this collection does not support connection
with the source's implementation of WTCollection.connect(QueryKey,WTCollection,boolean)
public boolean connect(WTReference ref, WTCollection source, boolean add_if_not_present)
add_if_not_present
is true
, then if the object does not exist yet in this
collection, it is added to it.
connect
in interface WTCollection
ref
- source
- add_if_not_present
- When true
, the object is added to this collection if it isn't currently contained by it.
IllegalArgumentException
- If the source does not have the same
key type as this collection
ClassCastException
- If this collection does not support connection
with the source's implementation of WTCollection.connect(WTReference,WTCollection,boolean)
public boolean connectAll(WTCollection source, boolean add_if_not_present)
add_if_not_present
is true
, all of the objects in the source collection
are added to this collection.
connectAll
in interface WTCollection
source
- add_if_not_present
- When true
, objects in source that aren't currently in this collection are added to this collection.
IllegalArgumentException
- If connect is true and source does
not have the same key type as this collection
ClassCastException
- If this collection does not support connection
with the source''s implementation of WTCollection.public boolean contains(Object o)
contains
in interface WTCollection
o
-
public boolean contains(Persistable p)
contains
in interface WTCollection
p
-
public boolean contains(QueryKey query_key)
contains
in interface WTCollection
query_key
-
public boolean contains(WTReference ref)
contains
in interface WTCollection
ref
-
public boolean containsInstance(Class filter)
containsInstance
in interface WTCollection
filter
-
protected boolean containsNonPersisted(Persistable p)
p
-
public boolean containsOnly(Class filter)
containsOnly
in interface WTCollection
filter
-
public void deflate()
deflate
in interface WTCollection
public abstract int getKeyMask()
getKeyMask
in interface WTCollection
CollectionsHelper.OBJECT_IDENTIFIER
,
CollectionsHelper.VERSION_FOREIGN_KEY
public void inflate() throws WTException
inflate
in interface WTCollection
WTException
public boolean isEnabled(int mask)
isEnabled
in interface WTCollection
mask
-
WTCollection.getKeyMask()
public Iterator iterator()
iterator
in interface WTCollection
public Collection persistableCollection()
The resulting collection is backed by this collection, so changes
to one are reflected in the other.
Supported API: false
persistableCollection
in interface WTCollection
public abstract Iterator persistableIterator() throws WTException
persistableIterator
in interface WTCollection
WTException
public abstract Iterator persistableIterator(Class filter, boolean include_subclasses) throws WTException
persistableIterator
in interface WTCollection
filter
- include_subclasses
-
WTException
WTCollection.persistableIterator()
public abstract Iterator queryKeyIterator()
queryKeyIterator
in interface WTCollection
public abstract Iterator queryKeyIterator(Class filter, boolean include_subclasses)
queryKeyIterator
in interface WTCollection
filter
- include_subclasses
-
WTCollection.queryKeyIterator()
public abstract Iterator referenceIterator()
referenceIterator
in interface WTCollection
public abstract Iterator referenceIterator(Class filter, boolean include_subclasses)
referenceIterator
in interface WTCollection
filter
- include_subclasses
-
WTCollection.queryKeyIterator()
public boolean remove(Object o)
remove
in interface WTCollection
o
-
public boolean remove(Persistable p)
remove
in interface WTCollection
p
-
protected boolean removeNonPersisted(Persistable p)
p
-
public boolean remove(QueryKey query_key)
remove
in interface WTCollection
query_key
-
public boolean remove(WTReference ref)
remove
in interface WTCollection
ref
-
public boolean removeAll(Class filter, boolean include_subclasses)
removeAll
in interface WTCollection
filter
- include_subclasses
-
public boolean retainAll(Class filter, boolean include_subclasses)
retainAll
in interface WTCollection
filter
- include_subclasses
-
public WTCollection subCollection(Class filter)
subCollection
in interface WTCollection
filter
-
public abstract WTCollection subCollection(Class filter, boolean include_subclasses)
subCollection
in interface WTCollection
filter
- include_subclasses
-
public Object[] toArray()
toArray
in interface WTCollection
public Object[] toArray(Object[] array)
toArray
in interface WTCollection
array
-
public Persistable[] toArray(Persistable[] array)
toArray
in interface WTCollection
array
-
public QueryKey[] toArray(QueryKey[] array)
toArray
in interface WTCollection
array
-
public WTReference[] toArray(WTReference[] array)
toArray
in interface WTCollection
array
-
public long[] toArray(long[] array)
toArray
in interface WTCollection
array
-
public long[] toIdArray()
toIdArray
in interface WTCollection
public boolean equals(Object o)
equals
in interface Collection
public int hashCode()
hashCode
in interface Collection
public WTReference getReference(Persistable p)
getReference
in interface ReferenceBased
p
-
public WTReference getReference(QueryKey q)
getReference
in interface ReferenceBased
q
-
public WTReference getReference(WTReference r)
getReference
in interface ReferenceBased
r
-
public WTReference[] getReferences(WTReference r)
getReferences
in interface ReferenceBased
r
-
void referenceAdded(WTReference r)
void referenceRemoved(WTReference r)
abstract boolean connect(WTReference r, boolean add)
protected WTReference getLastReturnedReference()
protected void setLastReturnedReference(WTReference r)
r
- ReferenceMap.IteratorListener getIteratorListener()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |