|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
wt.fc.collections.UnmodifiableCollections.UnmodifiableCollection
wt.fc.collections.UnmodifiableCollections.UnmodifiableList
Field Summary | |
(package private) WTCollection |
c
|
(package private) WTList |
list
|
Fields inherited from interface wt.fc.collections.WTCollection |
DEFLATED_ON_SERIALIZATION |
Constructor Summary | |
(package private) |
UnmodifiableCollections.UnmodifiableList(WTList list)
|
Method Summary | |
void |
add(int param,
Object object)
Adds the given object at the given index. |
void |
add(int param,
Persistable p)
Adds the given object at the given index. |
void |
add(int param,
QueryKey key)
Adds the given object at the given index. |
void |
add(int param,
WTReference ref)
Adds the given object at the given index. |
boolean |
add(Persistable p)
Adds the given object to this collection. |
boolean |
add(QueryKey key)
Adds the given object to this collection. |
boolean |
add(WTReference ref)
Adds the given object to this collection. |
boolean |
addAll(int param,
Collection collection)
Adds the given collection of objects at the given index. |
boolean |
addAll(QueryResult queryResult)
Adds the contents of a QueryResult to this collection. |
Iterator |
classIterator()
Returns an iterator over the classes that have instances in this collection. |
void |
clear()
|
void |
connect(int index,
Persistable p,
WTCollection source)
Connects the given object from the source collection to this collection, at the given index. |
void |
connect(int index,
QueryKey key,
WTCollection source)
Connects the given object from the source collection to this collection, at the given index. |
void |
connect(int index,
WTReference ref,
WTCollection source)
Connects the given object from the source collection to this collection, at the given index. |
boolean |
connect(Persistable p,
WTCollection source)
Connects the given object from the source collection to this collection. |
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 key,
WTCollection source)
Connects the given object from the source collection to this collection. |
boolean |
connect(QueryKey key,
WTCollection source,
boolean add_if_not_present)
Connects the given object from the source collection to this collection. |
(package private) boolean |
connect(WTReference r,
boolean add)
|
boolean |
connect(WTReference ref,
WTCollection source)
Connects the given object from the source collection to this collection. |
boolean |
connect(WTReference ref,
WTCollection source,
boolean add_if_not_present)
Connects the given object from the source collection to this collection. |
boolean |
connectAll(int index,
WTCollection source)
Connects the objects in the source collection to this collection, starting at the given index. |
boolean |
connectAll(WTCollection source)
Connects the elements in the source collection to this collection. |
boolean |
connectAll(WTCollection source,
boolean add_if_not_present)
Connects the elements in the source collection to this collection. |
boolean |
contains(Object o)
Returns true if the collection contains the given QueryKey, WTReference, or Persistable, in any form. |
boolean |
contains(Persistable p)
Determines if the collection contains the given object in some form. |
boolean |
contains(QueryKey key)
Determines if the collection contains the given object in some form. |
boolean |
contains(WTReference ref)
Determines if the collection contains the given object in some form. |
boolean |
containsAll(Collection c)
|
boolean |
containsInstance(Class clazz)
Returns true if there is at least one object in the collection that the filter class is assignable from. |
boolean |
containsOnly(Class clazz)
Determines whether this collection only contains objects that are assignable from the given filter. |
void |
deflate()
Dereferences all Persistables in this collection that have QueryKeys. |
boolean |
equals(Object o)
|
Object |
get(int index)
Gets the WTReference at the specified index. |
int |
getKeyMask()
Returns this collection's key mask. |
Persistable |
getPersistable(int param)
Gets the Persistable at the specified index. |
QueryKey |
getQueryKey(int param)
Gets the QueryKey at the specified index. |
WTReference |
getReference(int param)
Gets the WTReference at the specified index. |
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 key. |
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 the references used internally by this collection that refers to the given reference. |
int |
hashCode()
|
int |
indexOf(Object o)
|
int |
indexOf(Persistable p)
Gets the index of the given object. |
int |
indexOf(QueryKey key)
Gets the index of the given object. |
int |
indexOf(WTReference ref)
Gets the index of the given object. |
void |
inflate()
Retrieves the full persistables for any objects in this collection that currently only have QueryKeys or WTReferences. |
boolean |
isDeflatedOnSerialization()
Gets the value of the attribute: DEFLATED_ON_SERIALIZATION. |
boolean |
isEmpty()
|
boolean |
isEnabled(int mask)
Returns true if the key types in the given mask are enabled for this collection. |
Iterator |
iterator()
Returns an iterator over the references in the collection, per the contract of the UnmodifiableCollections.UnmodifiableCollection.referenceIterator() API. |
int |
lastIndexOf(Object o)
|
int |
lastIndexOf(Persistable p)
Gets the last index of the given object. |
int |
lastIndexOf(QueryKey key)
Gets the last index of the given object. |
int |
lastIndexOf(WTReference ref)
Gets the last index of the given object. |
ListIterator |
listIterator()
Returns a ListIterator over the WTReferences in this list, per the contract of referenceListIterator(). |
ListIterator |
listIterator(int index)
Returns a ListIterator over the WTReferences in this list starting at the given index, per the contract of referenceListIterator(int). |
Collection |
persistableCollection()
Provides a Persistable-based view of the objects in this WTCollection. |
Iterator |
persistableIterator()
Returns an iterator over the objects in this collection, as Persistables. |
Iterator |
persistableIterator(Class clazz,
boolean param)
Refines persistableIterator() to only return objects that are either direct or descendent instances of the filter class, depending on the value of include_subclasses. |
ListIterator |
persistableListIterator()
Returns a ListIterator over the Persistables in this list. |
ListIterator |
persistableListIterator(int param)
Returns a ListIterator over the Persistables in this list, starting at the given index. |
Iterator |
queryKeyIterator()
Returns an iterator over the QueryKeys in this collection. |
Iterator |
queryKeyIterator(Class clazz,
boolean param)
Refines queryKeyIterator() to only return keys that are either direct or descendent instances of the filter class, depending on the value of include_subclasses. |
ListIterator |
queryKeyListIterator()
Returns a ListIterator over the QueryKeys in this list. |
ListIterator |
queryKeyListIterator(int param)
Returns a ListIterator over the QueryKeys in this list, starting at the given index. |
Iterator |
referenceIterator()
Returns an Iterator over the objects in this collection, as WTReferences. |
Iterator |
referenceIterator(Class clazz,
boolean param)
Refines referenceIterator() to only return references that are either direct or descendent instances of the filter class, depending on the value of include_subclasses. |
ListIterator |
referenceListIterator()
Returns a ListIterator over the WTReferences in this list. |
ListIterator |
referenceListIterator(int param)
Returns a ListIterator over the WTReferences in this list, starting at the given index. |
Object |
remove(int index)
|
boolean |
remove(Object o)
Removes any form of the object in the collection. |
boolean |
remove(Persistable p)
Removes the object from this collection. |
boolean |
remove(QueryKey key)
Removes the object from this collection. |
boolean |
remove(WTReference ref)
Removes the object from this collection. |
boolean |
removeAll(Class clazz,
boolean param)
Removes all objects in this collection that are assignable from the given class. |
boolean |
retainAll(Class clazz,
boolean param)
Removes all objects in this collection that are not assignable from the given class. |
Object |
set(int index,
Object element)
Assigns the object to the given index. |
Persistable |
set(int param,
Persistable p)
Sets the object at the given index. |
QueryKey |
set(int param,
QueryKey key)
Sets the object at the given index. |
WTReference |
set(int param,
WTReference ref)
Sets the object at the given index. |
void |
setDeflatedOnSerialization(boolean param)
Sets the value of the attribute: DEFLATED_ON_SERIALIZATION. |
int |
size()
|
WTCollection |
subCollection(Class clazz)
Returns a WTCollection containing the objects in this collection that are assignable from the given filter class. |
WTCollection |
subCollection(Class clazz,
boolean include_subclasses)
Returns a sub collection of all the objects in this collection that are either direct or descendent instances of the filter class, depending on the value of include_subclasses. |
List |
subList(int fromIndex,
int toIndex)
Returns a sublist of backed by this WTList, per the contract of List.subList(int,int)
Supported API: true |
Object[] |
toArray()
Returns an object array filled with WTReferences to all the objects in this collection. |
long[] |
toArray(long[] values)
Fills the given array with the long ids from each QueryKey in this collection. |
Object[] |
toArray(Object[] a)
Fills the given array with the objects in this collection. |
Persistable[] |
toArray(Persistable[] p)
Fills the given array with the Persistables in this collection. |
QueryKey[] |
toArray(QueryKey[] key)
Fills the given array with the QueryKeys in this collection. |
WTReference[] |
toArray(WTReference[] ref)
Fills the given array with WTReferences to all the objects in this collection. |
long[] |
toIdArray()
Returns an array with the long ids from each QueryKey in this collection. |
String |
toString()
|
Methods inherited from class java.util.AbstractCollection |
add, addAll, removeAll, retainAll |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface wt.fc.collections.WTList |
connect, connect, connect |
Methods inherited from interface wt.fc.collections.WTCollection |
add, add, add, add, addAll, addAll, classIterator, connect, connect, connect, connectAll, connectAll, contains, contains, contains, contains, containsInstance, containsOnly, deflate, getKeyMask, inflate, isDeflatedOnSerialization, isEnabled, iterator, persistableCollection, persistableIterator, persistableIterator, queryKeyIterator, queryKeyIterator, referenceIterator, referenceIterator, remove, remove, remove, remove, removeAll, retainAll, setDeflatedOnSerialization, toArray, toArray, toArray, toArray, toArray, toArray, toIdArray |
Methods inherited from interface java.util.Collection |
clear, containsAll, isEmpty, removeAll, retainAll, size |
Methods inherited from interface java.util.List |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Field Detail |
WTList list
WTCollection c
Constructor Detail |
UnmodifiableCollections.UnmodifiableList(WTList list)
Method Detail |
public void add(int param, Object object)
WTList
WTCollection.add(Object)
for further documentation
add
in interface WTList
param
- object
- public void add(int param, WTReference ref)
WTList
WTCollection.add(Object)
for further documentation
add
in interface WTList
param
- ref
- public void add(int param, Persistable p)
WTList
WTCollection.add(Object)
for further documentation
add
in interface WTList
param
- p
- public void add(int param, QueryKey key)
WTList
WTCollection.add(Object)
for further documentation
add
in interface WTList
param
- key
- public boolean addAll(int param, Collection collection)
WTList
WTCollection.add(Object)
for further documentation
addAll
in interface WTList
param
- collection
-
public void connect(int index, WTReference ref, WTCollection source)
WTList
connect
in interface WTList
index
- ref
- source
- WTCollection.connect(Persistable, WTCollection)
public void connect(int index, Persistable p, WTCollection source)
WTList
connect
in interface WTList
index
- p
- source
- WTCollection.connect(Persistable, WTCollection)
public void connect(int index, QueryKey key, WTCollection source)
WTList
connect
in interface WTList
index
- key
- source
- WTCollection.connect(Persistable, WTCollection)
public boolean connectAll(int index, WTCollection source)
WTList
connectAll
in interface WTList
index
- source
-
WTCollection.connectAll(WTCollection)
public Object get(int index)
WTList
get
in interface WTList
index
-
public Persistable getPersistable(int param) throws WTException
WTList
getPersistable
in interface WTList
param
-
WTException
public QueryKey getQueryKey(int param)
WTList
getQueryKey
in interface WTList
param
-
public WTReference getReference(int param)
WTList
getReference
in interface WTList
param
-
public int indexOf(Persistable p)
WTList
indexOf
in interface WTList
p
-
List.indexOf(Object)
public int indexOf(QueryKey key)
WTList
indexOf
in interface WTList
key
-
List.indexOf(Object)
public int indexOf(Object o)
indexOf
in interface List
public int indexOf(WTReference ref)
WTList
indexOf
in interface WTList
ref
-
List.indexOf(Object)
public int lastIndexOf(QueryKey key)
WTList
lastIndexOf
in interface WTList
key
-
List.lastIndexOf(Object)
public int lastIndexOf(Persistable p)
WTList
lastIndexOf
in interface WTList
p
-
List.lastIndexOf(Object)
public int lastIndexOf(WTReference ref)
WTList
lastIndexOf
in interface WTList
ref
-
List.lastIndexOf(Object)
public int lastIndexOf(Object o)
lastIndexOf
in interface List
public ListIterator listIterator()
WTList
listIterator
in interface WTList
public ListIterator listIterator(int index)
WTList
listIterator
in interface WTList
index
-
public ListIterator persistableListIterator() throws WTException
WTList
WTCollection.persistableIterator()
.
persistableListIterator
in interface WTList
WTException
public ListIterator persistableListIterator(int param) throws WTException
WTList
WTCollection.persistableIterator()
.
persistableListIterator
in interface WTList
param
-
WTException
public ListIterator queryKeyListIterator()
WTList
queryKeyListIterator
in interface WTList
public ListIterator queryKeyListIterator(int param)
WTList
queryKeyListIterator
in interface WTList
param
-
public ListIterator referenceListIterator()
WTList
referenceListIterator
in interface WTList
public ListIterator referenceListIterator(int param)
WTList
referenceListIterator
in interface WTList
param
-
public Object remove(int index)
remove
in interface List
public WTReference set(int param, WTReference ref)
WTList
WTList.set(int, Object)
for further documentation.
set
in interface WTList
param
- ref
-
public QueryKey set(int param, QueryKey key)
WTList
WTList.set(int, Object)
for further documentation.
set
in interface WTList
param
- key
-
public Object set(int index, Object element)
WTList
set
in interface WTList
index
- element
-
public Persistable set(int param, Persistable p)
WTList
WTList.set(int, Object)
for further documentation.
set
in interface WTList
param
- p
-
public WTCollection subCollection(Class clazz)
WTCollection
WTCollection.subCollection(Class,
boolean)
for further documentation.
subCollection
in interface WTCollection
subCollection
in class UnmodifiableCollections.UnmodifiableCollection
public WTCollection subCollection(Class clazz, boolean include_subclasses)
WTCollection
subCollection
in interface WTCollection
subCollection
in class UnmodifiableCollections.UnmodifiableCollection
public List subList(int fromIndex, int toIndex)
WTList
List.subList(int,int)
subList
in interface WTList
fromIndex
- toIndex
-
public boolean equals(Object o)
equals
in interface Collection
equals
in class UnmodifiableCollections.UnmodifiableCollection
public int hashCode()
hashCode
in interface Collection
hashCode
in class UnmodifiableCollections.UnmodifiableCollection
public boolean add(WTReference ref)
WTCollection
WTCollection.add(Object)
for documentation for this method.
add
in interface WTCollection
ref
-
public boolean add(Persistable p)
WTCollection
WTCollection.add(Object)
for documentation for this method.
add
in interface WTCollection
p
-
public boolean add(QueryKey key)
WTCollection
WTCollection.add(Object)
for documentation for this method.
add
in interface WTCollection
key
-
public boolean addAll(QueryResult queryResult)
WTCollection
addAll
in interface WTCollection
queryResult
-
public Iterator classIterator()
WTCollection
classIterator
in interface WTCollection
public void clear()
clear
in interface Collection
public boolean connect(WTReference ref, WTCollection source)
WTCollection
connect
in interface WTCollection
ref
- source
-
WTCollection.connect(WTReference,WTCollection,boolean)
public boolean connect(Persistable p, WTCollection source)
WTCollection
connect
in interface WTCollection
p
- source
-
WTCollection.connect(Persistable,WTCollection,boolean)
public boolean connect(QueryKey key, WTCollection source)
WTCollection
connect
in interface WTCollection
key
- source
-
WTCollection.connect(QueryKey,WTCollection,boolean)
public boolean connect(WTReference ref, WTCollection source, boolean add_if_not_present)
WTCollection
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.
WTCollection.connect(WTReference,WTCollection,boolean)
public boolean connect(Persistable p, WTCollection source, boolean add_if_not_present)
WTCollection
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.
WTCollection.connect(Persistable,WTCollection,boolean)
public boolean connect(QueryKey key, WTCollection source, boolean add_if_not_present)
WTCollection
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
key
- source
- add_if_not_present
- When true
, the object is added to this collection if it isn't currently contained by it.
WTCollection.connect(QueryKey,WTCollection,boolean)
public boolean connectAll(WTCollection source)
WTCollection
connectAll
in interface WTCollection
source
-
public boolean connectAll(WTCollection source, boolean add_if_not_present)
WTCollection
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.
boolean connect(WTReference r, boolean add)
public boolean contains(QueryKey key)
WTCollection
WTCollection.contains(Object)
for further documentation.
contains
in interface WTCollection
key
-
public boolean contains(Object o)
WTCollection
Contains is overloaded with type-specific methods to allow callers
to avoid the overhead of an instanceof check. The generic contains()
delegates to the appropriate type-specific one.
Supported API: true
contains
in interface WTCollection
public boolean contains(Persistable p)
WTCollection
WTCollection.contains(Object)
for further documentation.
contains
in interface WTCollection
p
-
public boolean contains(WTReference ref)
WTCollection
WTCollection.contains(Object)
for further documentation.
contains
in interface WTCollection
ref
-
public boolean containsAll(Collection c)
containsAll
in interface Collection
public boolean containsInstance(Class clazz)
WTCollection
containsInstance
in interface WTCollection
clazz
-
public boolean containsOnly(Class clazz)
WTCollection
containsOnly
in interface WTCollection
clazz
-
public void deflate()
WTCollection
deflate
in interface WTCollection
public int getKeyMask()
WTCollection
getKeyMask
in interface WTCollection
CollectionsHelper.OBJECT_IDENTIFIER
,
CollectionsHelper.VERSION_FOREIGN_KEY
public void inflate() throws WTException
WTCollection
inflate
in interface WTCollection
WTException
public boolean isDeflatedOnSerialization()
WTCollection
true
, this collection only serializes QueryKeys
for objects that have them. Objects without QueryKeys are still serialized.
This property defaults to false and is transient to force callers
to explicitly enable it, to avoid unintentional deflations.
isDeflatedOnSerialization
in interface WTCollection
public boolean isEmpty()
isEmpty
in interface Collection
public boolean isEnabled(int mask)
WTCollection
isEnabled
in interface WTCollection
mask
-
WTCollection.getKeyMask()
public Iterator iterator()
WTCollection
WTCollection.referenceIterator()
API.
iterator
in interface WTCollection
public Collection persistableCollection()
WTCollection
The resulting collection is backed by this collection, so changes
to one are reflected in the other.
Supported API: true
persistableCollection
in interface WTCollection
public Iterator persistableIterator() throws WTException
WTCollection
persistableIterator
in interface WTCollection
WTException
public Iterator persistableIterator(Class clazz, boolean param) throws WTException
WTCollection
If a refresh is necessary, implementations should only refresh objects
of the given filter class, rather than all the objects in the collection.
Supported API: false
persistableIterator
in interface WTCollection
clazz
- param
-
WTException
WTCollection.persistableIterator()
public Iterator queryKeyIterator()
WTCollection
queryKeyIterator
in interface WTCollection
public Iterator queryKeyIterator(Class clazz, boolean param)
WTCollection
queryKeyIterator
in interface WTCollection
clazz
- param
-
WTCollection.queryKeyIterator()
public Iterator referenceIterator()
WTCollection
referenceIterator
in interface WTCollection
public Iterator referenceIterator(Class clazz, boolean param)
WTCollection
referenceIterator
in interface WTCollection
clazz
- param
-
WTCollection.queryKeyIterator()
public boolean remove(Persistable p)
WTCollection
WTCollection.remove(Object)
for further documentation. Removes the object from this collection.
See WTCollection.remove(Object)
for further documentation.
remove
in interface WTCollection
p
-
public boolean remove(Object o)
WTCollection
Remove is overloaded with type-specific methods to allow callers to
avoid the overhead of an instanceof check. The generic remove() delegates
to the appropriate type-specific one.
Supported API: true
remove
in interface WTCollection
public boolean remove(WTReference ref)
WTCollection
WTCollection.remove(Object)
for further documentation. See WTCollection.remove(Object)
for further
documentation.
remove
in interface WTCollection
ref
-
public boolean remove(QueryKey key)
WTCollection
WTCollection.remove(Object)
for further documentation. See WTCollection.remove(Object)
for further
documentation.
remove
in interface WTCollection
key
-
public boolean removeAll(Class clazz, boolean param)
WTCollection
removeAll
in interface WTCollection
clazz
- param
-
public boolean retainAll(Class clazz, boolean param)
WTCollection
retainAll
in interface WTCollection
clazz
- param
-
public void setDeflatedOnSerialization(boolean param) throws WTPropertyVetoException
WTCollection
true
, this collection only serializes QueryKeys
for objects that have them. Objects without QueryKeys are still serialized.
This property defaults to false and is transient to force callers
to explicitly enable it, to avoid unintentional deflations.
setDeflatedOnSerialization
in interface WTCollection
param
-
WTPropertyVetoException
public int size()
size
in interface Collection
public Object[] toArray()
WTCollection
toArray
in interface WTCollection
public long[] toArray(long[] values)
WTCollection
toArray
in interface WTCollection
values
-
public Object[] toArray(Object[] a)
WTCollection
toArray
in interface WTCollection
public WTReference[] toArray(WTReference[] ref)
WTCollection
toArray
in interface WTCollection
ref
-
public QueryKey[] toArray(QueryKey[] key)
WTCollection
toArray
in interface WTCollection
key
-
public Persistable[] toArray(Persistable[] p)
WTCollection
toArray
in interface WTCollection
p
-
public long[] toIdArray()
WTCollection
toIdArray
in interface WTCollection
public String toString()
public WTReference getReference(WTReference r)
ReferenceBased
getReference
in interface ReferenceBased
r
-
public WTReference getReference(QueryKey q)
ReferenceBased
getReference
in interface ReferenceBased
q
-
public WTReference getReference(Persistable p)
ReferenceBased
getReference
in interface ReferenceBased
p
-
public WTReference[] getReferences(WTReference r)
ReferenceBased
getReferences
in interface ReferenceBased
r
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |