wt.fc.collections
Interface WTSet

All Superinterfaces:
Collection, Iterable, Set, WTCollection
All Known Implementing Classes:
WTHashSet

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


Method Summary
 
Methods inherited from interface wt.fc.collections.WTCollection
add, add, add, add, addAll, addAll, classIterator, connect, connect, connect, connectAll, contains, contains, contains, contains, containsInstance, containsOnly, deflate, getKeyMask, inflate, isEnabled, iterator, persistableCollection, persistableIterator, queryKeyIterator, referenceIterator, remove, remove, remove, remove, removeAll, retainAll, subCollection, toArray, toArray, toArray, toArray, toArray, toArray, toIdArray
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray