org.objectweb.jorm.facility.meminst.genclass.java.util
Class Set

java.lang.Object
  |
  +--org.objectweb.jorm.facility.meminst.genclass.java.util.Collection
        |
        +--org.objectweb.jorm.facility.meminst.genclass.java.util.Set
All Implemented Interfaces:
java.util.Collection, Collection, LazyLoad, Loggable, PAccessor, PGenClassAccessor, PIndexedElemFactory, java.util.Set, Set

public class Set
extends Collection
implements java.util.Set, Set

Author:
P. D?chamboux

Fields inherited from class org.objectweb.jorm.facility.meminst.genclass.java.util.Collection
connectionFactory, elements, etype, loaded, logger, pBinding, pieFactory, tmpelem
 
Constructor Summary
Set(int size, PIndexedElemFactory pief)
          Set instanciates and initialize a new set with an initial set size
Set(PIndexedElemFactory pief)
           
 
Method Summary
 boolean add(java.lang.Object o, java.lang.Object connection)
          Adds the specified element to this set if it is not already present.
 boolean addAll(Set c, java.lang.Object connection)
          Adds all of the elements in the specified collection to this set if they're not already present (optional operation).
 boolean contains(java.lang.Object o, java.lang.Object connection)
          Returns true if this set contains the specified element.
 boolean containsAll(Set c, java.lang.Object connection)
          Returns true if this set contains all of the elements of the specified collection.
 boolean remove(java.lang.Object o, java.lang.Object connection)
          remove Removes the specified element from this set if it is present (implemented optional operation).
 boolean removeAll(Set c, java.lang.Object connection)
          Removes from this set all of its elements that are contained in the specified collection (optional operation).
 boolean retainAll(Set c, java.lang.Object connection)
          Retains only the elements in this set that are contained in the specified collection (optional operation).
 
Methods inherited from class org.objectweb.jorm.facility.meminst.genclass.java.util.Collection
add, addAll, addAll, cleanElements, clear, clear, contains, containsAll, containsAll, createPIndexedElem, equals, getLogger, getLoggerFactory, getMemoryInstance, getPBinding, init, isEmpty, isEmpty, isLoaded, iterator, iterator, load, paAdd, paDeltaSupported, paGetNbElem, paIterator, paSetNbElem, remove, removeAll, removeAll, retainAll, retainAll, setConnectionFactory, setLogger, setLoggerFactory, setPBinding, size, size, store, toArray, toArray, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface org.objectweb.jorm.facility.meminst.genclass.api.Set
clear, isEmpty, iterator, size, toArray, toArray
 

Constructor Detail

Set

public Set(PIndexedElemFactory pief)

Set

public Set(int size,
           PIndexedElemFactory pief)
Set instanciates and initialize a new set with an initial set size
Method Detail

add

public boolean add(java.lang.Object o,
                   java.lang.Object connection)
            throws PException
Adds the specified element to this set if it is not already present.
Specified by:
add in interface Set
Overrides:
add in class Collection
Parameters:
o - the object to be added.

contains

public boolean contains(java.lang.Object o,
                        java.lang.Object connection)
                 throws PException
Returns true if this set contains the specified element.
Specified by:
contains in interface Set
Overrides:
contains in class Collection
Following copied from interface: org.objectweb.jorm.facility.meminst.genclass.api.Set
Parameters:
o - element whose presence in this set is to be tested.
connection - used to access the data store
Returns:
true if this set contains the specified element.
Throws:
PException - a internal jorm error occured

remove

public boolean remove(java.lang.Object o,
                      java.lang.Object connection)
               throws PException
remove Removes the specified element from this set if it is present (implemented optional operation).
Specified by:
remove in interface Set
Overrides:
remove in class Collection
Following copied from interface: org.objectweb.jorm.facility.meminst.genclass.api.Set
Parameters:
o - object to be removed from this set, if present.
connection - used to access the data store
Returns:
true if the set contained the specified element.
Throws:
java.lang.UnsupportedOperationException - if the remove method is not supported by this set.
PException - a internal jorm error occured

containsAll

public boolean containsAll(Set c,
                           java.lang.Object connection)
                    throws PException
Description copied from interface: Set
Returns true if this set contains all of the elements of the specified collection. If the specified collection is also a set, this method returns true if it is a subset of this set.
Specified by:
containsAll in interface Set
Following copied from interface: org.objectweb.jorm.facility.meminst.genclass.api.Set
Parameters:
c - collection to be checked for containment in this set.
connection - used to access the data store
Returns:
true if this set contains all of the elements of the specified collection.
Throws:
PException - a internal jorm error occured

addAll

public boolean addAll(Set c,
                      java.lang.Object connection)
               throws PException
Description copied from interface: Set
Adds all of the elements in the specified collection to this set if they're not already present (optional operation). If the specified collection is also a set, the addAll operation effectively modifies this set so that its value is the union of the two sets. The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress.
Specified by:
addAll in interface Set
Following copied from interface: org.objectweb.jorm.facility.meminst.genclass.api.Set
Parameters:
c - collection whose elements are to be added to this set.
connection - used to access the data store
Returns:
true if this set changed as a result of the call.
Throws:
java.lang.UnsupportedOperationException - if the addAll method is not supported by this set.
ClassCastException - if the class of some element of the specified collection prevents it from being added to this set.
java.lang.IllegalArgumentException - if some aspect of some element of the specified collection prevents it from being added to this set.
PException - a internal jorm error occured
See Also:
#add(Object)

retainAll

public boolean retainAll(Set c,
                         java.lang.Object connection)
                  throws PException
Description copied from interface: Set
Retains only the elements in this set that are contained in the specified collection (optional operation). In other words, removes from this set all of its elements that are not contained in the specified collection. If the specified collection is also a set, this operation effectively modifies this set so that its value is the intersection of the two sets.
Specified by:
retainAll in interface Set
Following copied from interface: org.objectweb.jorm.facility.meminst.genclass.api.Set
Parameters:
c - collection that defines which elements this set will retain.
connection - used to access the data store
Returns:
true if this collection changed as a result of the call.
Throws:
java.lang.UnsupportedOperationException - if the retainAll method is not supported by this Collection.
PException - a internal jorm error occured
See Also:
#remove(Object)

removeAll

public boolean removeAll(Set c,
                         java.lang.Object connection)
                  throws PException
Description copied from interface: Set
Removes from this set all of its elements that are contained in the specified collection (optional operation). If the specified collection is also a set, this operation effectively modifies this set so that its value is the asymmetric set difference of the two sets.
Specified by:
removeAll in interface Set
Following copied from interface: org.objectweb.jorm.facility.meminst.genclass.api.Set
Parameters:
c - collection that defines which elements will be removed from this set.
connection - used to access the data store
Returns:
true if this set changed as a result of the call.
Throws:
java.lang.UnsupportedOperationException - if the removeAll method is not supported by this Collection.
PException - a internal jorm error occured
See Also:
#remove(Object)