org.objectweb.jonas_ejb.container.jorm
Class Set
java.lang.Object
|
+--org.objectweb.jonas_ejb.container.jorm.GenClassImpl
|
+--org.objectweb.jonas_ejb.container.jorm.Set
- All Implemented Interfaces:
- java.util.Collection, org.objectweb.jorm.api.PAccessor, org.objectweb.jorm.api.PGenClassAccessor, org.objectweb.jorm.api.PIndexedElemFactory, java.util.Set
- public class Set
- extends GenClassImpl
- implements java.util.Set
This class is a basic implementation of the java.util.Set based on the
generic class implementation (GenClassImpl) and the Collection
implementation. This class can be used to represent a relation between bean.
- Author:
- S.Chassande-Barrioz
Constructor Summary |
Set()
|
Set(org.objectweb.jorm.api.PClassMapping gcm)
|
Method Summary |
boolean |
add(java.lang.Object o)
Before adding the object into the set, it checks that the new element
does not exist. |
boolean |
add(java.lang.Object o,
boolean isMaster,
boolean callListener)
|
boolean |
addAll(java.util.Collection collection)
It iterates over the collection parameter to add each element in the
collection. |
void |
clear()
It removes all elements. |
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection collection)
|
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
boolean |
remove(java.lang.Object o)
|
boolean |
remove(java.lang.Object o,
boolean isMaster,
boolean callListener)
|
boolean |
removeAll(java.util.Collection collection)
It iterates over the collection parameter to remove each element in the
collection. |
boolean |
retainAll(java.util.Collection collection)
For each element of the current collection, it checks if it exist into
the collection parameter. |
int |
size()
|
java.lang.Object[] |
toArray()
It returns an array of the elements. |
java.lang.Object[] |
toArray(java.lang.Object[] objects)
|
Methods inherited from class org.objectweb.jonas_ejb.container.jorm.GenClassImpl |
createPIndexedElem, doNotWrite, gcAdd, gcClear, gcContains, gcDeref, gcGetElement, gcGetPBinding, gcGetRealIndex, gcGetSize, gcIsModified, gcIterator, gcIterator, gcObject2ref, gcRemove, getListener, getMemoryInstance, paAdd, paDeltaSupported, paGetNbElem, paIterator, paSetNbElem, printState, read, reset, setListener, setPBinding, setPClassMapping, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Set |
equals, hashCode |
Set
public Set(org.objectweb.jorm.api.PClassMapping gcm)
Set
public Set()
add
public boolean add(java.lang.Object o)
- Before adding the object into the set, it checks that the new element
does not exist.
- Specified by:
add
in interface java.util.Set
- Parameters:
o
- is the element to add- Returns:
- true is the element has been added, and false is the element
already exists in the set.
add
public boolean add(java.lang.Object o,
boolean isMaster,
boolean callListener)
size
public int size()
- Specified by:
size
in interface java.util.Set
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface java.util.Set
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains
in interface java.util.Set
iterator
public java.util.Iterator iterator()
- Specified by:
iterator
in interface java.util.Set
toArray
public java.lang.Object[] toArray()
- It returns an array of the elements. It is built by an iteration over the
existing elements.
- Specified by:
toArray
in interface java.util.Set
toArray
public java.lang.Object[] toArray(java.lang.Object[] objects)
- Specified by:
toArray
in interface java.util.Set
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interface java.util.Set
remove
public boolean remove(java.lang.Object o,
boolean isMaster,
boolean callListener)
containsAll
public boolean containsAll(java.util.Collection collection)
- Specified by:
containsAll
in interface java.util.Set
addAll
public boolean addAll(java.util.Collection collection)
- It iterates over the collection parameter to add each element in the
collection.
- Specified by:
addAll
in interface java.util.Set
removeAll
public boolean removeAll(java.util.Collection collection)
- It iterates over the collection parameter to remove each element in the
collection.
- Specified by:
removeAll
in interface java.util.Set
retainAll
public boolean retainAll(java.util.Collection collection)
- For each element of the current collection, it checks if it exist into
the collection parameter. If it does not found then it is removed from
the current collection.
- Specified by:
retainAll
in interface java.util.Set
clear
public void clear()
- It removes all elements.
- Specified by:
clear
in interface java.util.Set