public class EJBHashSet extends HashSet
Constructor and Description |
---|
EJBHashSet(PersistenceManager pm,
JDOEJB20Helper helper,
Collection pcs)
Creates new instance of
EJBHashSet for this parameters. |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Object o)
Adds the specified element to this set if it is not already
present.
|
boolean |
addAll(Collection c)
Adds all of the elements in the specified collection to this collection
|
void |
clear()
Removes all of the elements from this set.
|
Object |
clone()
Returns a shallow copy of this HashSet instance: the elements
themselves are not cloned.
|
boolean |
contains(Object o)
Returns true if this set contains the specified element.
|
boolean |
containsAll(Collection c)
Returns true if this collection contains all of the elements
in the specified collection.
|
HashSet |
getSCOHashSet()
Returns set of the persistence-capable instances associated
with this Set.
|
void |
invalidate()
Marks this Set as invalid and releases all references.
|
boolean |
isEmpty()
Returns true if this set contains no elements.
|
Iterator |
iterator()
Returns an iterator over the elements in this set.
|
boolean |
remove(Object o)
Removes the given element from this set if it is present.
|
boolean |
removeAll(Collection c)
Removes from this collection all of its elements that are contained in
the specified collection (optional operation).
|
boolean |
retainAll(Collection c)
Retains only the elements in this collection that are contained in the
specified collection (optional operation).
|
void |
setSCOHashSet(Collection coll)
Replace the set of the persistence-capable instances associated
with this EJBHashSet.
|
int |
size()
Returns the number of elements in this set (its cardinality).
|
spliterator
equals, hashCode
toArray, toArray, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
parallelStream, removeIf, stream
public EJBHashSet(PersistenceManager pm, JDOEJB20Helper helper, Collection pcs)
EJBHashSet
for this parameters.pm
- the PersistenceManager associated with the calling bean.helper
- the JDOEJB20Helper instance.pcs
- a Collection of persistence-capable instances.public boolean add(Object o)
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface Set
addAll
in class AbstractCollection
c
- collection whose elements are to be added to this collection.UnsupportedOperationException
- if the addAll method is
not supported by this collection.AbstractCollection
,
HashSet
public boolean remove(Object o)
public boolean removeAll(Collection c)
Processes each element remove internally not to have call backs into #remove(Object).
removeAll
in interface Collection
removeAll
in interface Set
removeAll
in class AbstractSet
c
- elements to be removed from this collection.UnsupportedOperationException
- removeAll is not supported
by this collection.HashSet
,
AbstractCollection
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface Set
retainAll
in class AbstractCollection
UnsupportedOperationException
- if the retainAll method
is not supported by this collection.HashSet
,
AbstractCollection
public void clear()
public int size()
public boolean isEmpty()
public boolean contains(Object o)
public boolean containsAll(Collection c)
This implementation iterates over the specified collection, checking each element returned by the iterator in turn to see if it's contained in this collection. If all elements are so contained true is returned, otherwise false.
containsAll
in interface Collection
containsAll
in interface Set
containsAll
in class AbstractCollection
c
- collection to be checked for containment in this collection.contains(Object)
public Object clone()
public HashSet getSCOHashSet()
public void setSCOHashSet(Collection coll)
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
iterator
in interface Set
iterator
in class HashSet
ConcurrentModificationException
public void invalidate()
Copyright © 2018. All rights reserved.