wt.fc.collections
Interface WTSet

All Superinterfaces:
Collection, Set, WTCollection
All Known Subinterfaces:
AsynchCollectionGraph, CollectionGraph
All Known Implementing Classes:
DefaultCollectionGraph, EmptyCollections.EmptySet, SynchronizedCollections.SynchronizedWTSet, UnmodifiableCollections.UnmodifiableSet, WTHashSet, WTKeyedHashMap.KeySet

public interface WTSet
extends WTCollection, Set

Refines the contract of WTCollection to require that all the objects in the implementing collection are unique. In the case of Persistables, this means that there will be only one Persistable per QueryKey in a WTSet. The uniqueness of objects without a QueryKey will be determined by their memory location (i.e., the java.lang.Object.hashCode() implementation).

Per Set's uniqueness contract, the add and addAll methods return false if they are called with a Persistable for which a QueryKey already exists in the set. However, if the Set does not already have a reference to the inflated Persistable, then it will opportunistically hold on to the reference to hopefully avoid a database hit.

Supported API: true

Extendable: false


Field Summary
 
Fields inherited from interface wt.fc.collections.WTCollection
DEFLATED_ON_SERIALIZATION
 
Methods inherited from interface wt.fc.collections.WTCollection
add, add, add, add, addAll, addAll, classIterator, connect, connect, connect, 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, subCollection, subCollection, toArray, toArray, toArray, toArray, toArray, toArray, toIdArray
 
Methods inherited from interface java.util.Collection
clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, size
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray