| 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
  |
  +--net.walend.lyophil.memory.MemSet
        |
        +--net.walend.lyophil.soft.SoftMemSet
This class implements MutableSetOfFreezables on top of a SoftHashMap.
| Field Summary | 
| Fields inherited from class net.walend.lyophil.memory.MemSet | 
 | 
| Fields inherited from interface net.walend.lyophil.collection.SetOfFreezables | 
EMPTY | 
| Constructor Summary | |
SoftMemSet()
Creates a new Set with a capacity of 7.  | 
|
SoftMemSet(CollectionOfFreezables c)
Creates a new Set that is a copy of c  | 
|
SoftMemSet(int size)
Creates a new Set with capacity of size.  | 
|
| Method Summary | |
 boolean | 
add(java.lang.Object object)
Adds a Object to the MutableCollection.  | 
 boolean | 
addAll(Collection c)
Adds all the Objects in c to this MutableCollection by using the add() method.  | 
 boolean | 
addAllIdentifiedBy(Collection c)
Adds all the Freezables identified by c to this MutableCollection using the addIdentifiedBy method.  | 
 boolean | 
addIdentifiedBy(java.io.Serializable id)
Adds a Freezable to the MutableCollection.  | 
 void | 
clear()
Removes all of the Objects in this collection.  | 
 boolean | 
contains(java.lang.Object ob)
Returns true if this collection contains the specified Object.  | 
 boolean | 
containsAll(Collection c)
Returns true if this collection contains all of the Objects in the specified collection.  | 
 boolean | 
containsAllIdentifiedBy(Collection ids)
Returns true if this collection contains the specified Freezables.  | 
 boolean | 
containsIdentifiedBy(java.io.Serializable id)
Returns true if this collection contains the specified Freezable.  | 
protected  MutableMap | 
createIdentifierMap(int size)
This method is called by the constructor.  | 
 FreezableIterator | 
freezableIterator()
Returns an iterator over the Freezables in this collection.  | 
protected  Freezable | 
getFreezable(java.io.Serializable identifier)
 | 
 java.lang.Object | 
getGuard()
Returns the synch guard for this object  | 
 Collection | 
getIdentifiers()
Returns a Collection of all the identifiers in this collection.  | 
 java.util.Collection | 
getJavaCollection()
Return a java.util.Collection of these Objects.  | 
 java.util.Set | 
getJavaSet()
Return a java.util.Collection of these Objects.  | 
 java.util.Iterator | 
identifierIterator()
Returns an iterator over the identifiers in this collection.  | 
 boolean | 
isEmpty()
Returns true if this collection contains no elements.  | 
 java.util.Iterator | 
iterator()
Returns an iterator over the Objects in this collection.  | 
 boolean | 
remove(java.lang.Object object)
Removes a Object from the MutableCollection.  | 
 boolean | 
removeAll(Collection c)
Removes all the Objects in c from this MutableCollection by using the remove() method.  | 
 boolean | 
removeAllIdentifiedBy(Collection c)
Removes all the Freezables identified by c from this MutableCollection using the removeIdentifiedBy method.  | 
 boolean | 
removeIdentifiedBy(java.io.Serializable id)
Removes a Freezable from the MutableCollection, based on that Freezable's identifier.  | 
 boolean | 
retainAll(Collection c)
Retains only the Objects in this collection that are contained in c by using the contains() and remove() methods.  | 
 boolean | 
retainAllIdentifiedBy(Collection c)
Removes all but the Freezables identified by c from this MutableCollection using the removeIdentifiedBy method.  | 
 boolean | 
sameContentsAs(Collection c)
Returns true if this Collection's contents are equal to c's.  | 
 boolean | 
sameStateAs(HasState victem)
If two HasStates have the same internal state, return true.  | 
 int | 
size()
Returns the number of elements in this collection.  | 
 java.lang.String | 
toString()
 | 
| Methods inherited from class net.walend.lyophil.memory.MemSet | 
checkFreezable, getIdentitor, getIDsToFreezables, getPrincipleInterface | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
public SoftMemSet()
public SoftMemSet(int size)
public SoftMemSet(CollectionOfFreezables c)
| Method Detail | 
protected MutableMap createIdentifierMap(int size)
createIdentifierMap in class MemSetpublic java.lang.Object getGuard()
protected Freezable getFreezable(java.io.Serializable identifier)
getFreezable in class MemSetpublic int size()
size in interface Collectionsize in class MemSetpublic boolean isEmpty()
isEmpty in interface CollectionisEmpty in class MemSetpublic boolean contains(java.lang.Object ob)
contains in interface Collectioncontains in class MemSetpublic java.util.Iterator iterator()
iterator in interface Collectioniterator in class MemSetpublic boolean containsAll(Collection c)
containsAll in interface CollectioncontainsAll in class MemSetpublic boolean sameContentsAs(Collection c)
sameContentsAs in interface CollectionsameContentsAs in class MemSetpublic java.util.Collection getJavaCollection()
getJavaCollection in interface CollectiongetJavaCollection in class MemSetpublic boolean add(java.lang.Object object)
add in interface MutableCollectionadd in class MemSetpublic boolean remove(java.lang.Object object)
remove in interface MutableCollectionremove in class MemSetpublic boolean addAll(Collection c)
addAll in interface MutableCollectionaddAll in class MemSetpublic boolean removeAll(Collection c)
removeAll in interface MutableCollectionremoveAll in class MemSetpublic boolean retainAll(Collection c)
retainAll in interface MutableCollectionretainAll in class MemSetpublic void clear()
clear in interface MutableCollectionclear in class MemSetpublic java.util.Set getJavaSet()
getJavaSet in interface SetgetJavaSet in class MemSetpublic boolean containsIdentifiedBy(java.io.Serializable id)
containsIdentifiedBy in interface CollectionOfFreezablescontainsIdentifiedBy in class MemSetpublic boolean containsAllIdentifiedBy(Collection ids)
containsAllIdentifiedBy in interface CollectionOfFreezablescontainsAllIdentifiedBy in class MemSetpublic FreezableIterator freezableIterator()
freezableIterator in interface CollectionOfFreezablesfreezableIterator in class MemSetpublic java.util.Iterator identifierIterator()
identifierIterator in interface CollectionOfFreezablesidentifierIterator in class MemSetpublic Collection getIdentifiers()
getIdentifiers in interface CollectionOfFreezablesgetIdentifiers in class MemSetpublic boolean addIdentifiedBy(java.io.Serializable id)
addIdentifiedBy in interface MutableCollectionOfFreezablesaddIdentifiedBy in class MemSetjava.lang.ClassCastException - class of the specified element prevents it from being
        added to this collection.java.lang.IllegalArgumentException - some aspect of this element prevents it from being
        added to this collection.ZombieIdentifierException - if f is not in the Freezer and this implementation checks on add.public boolean removeIdentifiedBy(java.io.Serializable id)
removeIdentifiedBy in interface MutableCollectionOfFreezablesremoveIdentifiedBy in class MemSetpublic boolean addAllIdentifiedBy(Collection c)
addAllIdentifiedBy in interface MutableCollectionOfFreezablesaddAllIdentifiedBy in class MemSetjava.lang.ClassCastException - if the class of an element of the specified collection prevents it from being
        added to this collection.java.lang.IllegalArgumentException - some aspect of an element of the specified collection prevents it from being
        added to this collection.public boolean removeAllIdentifiedBy(Collection c)
removeAllIdentifiedBy in interface MutableCollectionOfFreezablesremoveAllIdentifiedBy in class MemSetjava.lang.ClassCastException - if the class of an element of the specified collection prevents it from being
        added to this collection.java.lang.IllegalArgumentException - some aspect of an element of the specified collection prevents it from being
        added to this collection.public boolean retainAllIdentifiedBy(Collection c)
retainAllIdentifiedBy in interface MutableCollectionOfFreezablesretainAllIdentifiedBy in class MemSetjava.lang.ClassCastException - if the class of an element of the specified collection prevents it from being
        added to this collection.java.lang.IllegalArgumentException - some aspect of an element of the specified collection prevents it from being
        added to this collection.public boolean sameStateAs(HasState victem)
HasStateFor objects with subobjects, Generally this method should only return true if the internal objects are equal. Implement a contentsHaveSameState() method to determine if the contents have the same state.
sameStateAs in interface HasStatesameStateAs in class MemSetpublic java.lang.String toString()
toString in class MemSet
  | 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||