|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.TreeSet
org.apache.jdo.impl.sco.TreeSet
public class TreeSet
A mutable 2nd class object that represents TreeSet.
TreeSet
,
Serialized FormConstructor Summary | |
---|---|
TreeSet(java.lang.Class elementType,
boolean allowNulls)
Creates a new empty TreeSet object. |
|
TreeSet(java.lang.Class elementType,
boolean allowNulls,
java.util.Comparator c)
Creates a new empty TreeSet object that has
the specified comparator. |
Method Summary | |
---|---|
boolean |
add(java.lang.Object o)
Adds the specified element to this set if it is not already present. |
boolean |
addAll(java.util.Collection c)
Adds all of the elements in the specified collection to this collection |
void |
addAllInternal(java.util.Collection c)
Adds objects of the given Collection to this Collection without recording the event. |
void |
addInternal(java.lang.Object o)
Adds object to the Collection without recording the event. |
boolean |
allowNulls()
Returns whether nulls are permitted as elements. |
void |
clear()
Removes all of the elements from this set. |
void |
clearInternal()
Clears Collection without recording the event. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
java.util.Comparator |
comparator()
|
boolean |
contains(java.lang.Object o)
These methods need to thaw the map before performing the operation. |
boolean |
containsAll(java.util.Collection c)
|
java.util.Iterator |
eitherIterator()
Create an iterator regardless whether the collection is frozen. |
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
first()
|
java.util.Iterator |
frozenIterator()
Create a new iterator over the frozen elements without thawing. |
java.util.Collection |
getAdded()
Returns the Collection of added elements |
java.lang.Class |
getElementType()
Returns the element type assignment compatible with all added elements of this collection. |
java.lang.String |
getFieldName()
Returns the field name |
java.lang.Object |
getOwner()
Returns the owner object of the SCO instance |
java.util.Collection |
getRemoved()
Returns the Collection of removed elements |
int |
hashCode()
|
java.util.SortedSet |
headSet(java.lang.Object toElement)
|
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
java.lang.Object |
last()
|
boolean |
remove(java.lang.Object o)
Removes the given element from this set if it is present. |
boolean |
removeAll(java.util.Collection c)
Removes from this collection all of its elements that are contained in the specified collection (optional operation). |
void |
removeInternal(java.lang.Object o)
Removes element from the Collection without recording the event. |
void |
reset()
Resets removed and added lists after flush |
boolean |
retainAll(java.util.Collection c)
Retains only the elements in this collection that are contained in the specified collection (optional operation). |
void |
setFrozen(java.lang.Object[] elements)
Set the contents of this Collection from the frozen elements, if this Collection is implicitly user-orderable. |
void |
setOwner(java.lang.Object owner,
int fieldNumber)
Sets the owner and field number. |
int |
size()
|
java.util.SortedSet |
subSet(java.lang.Object fromElement,
java.lang.Object toElement)
|
java.util.SortedSet |
tailSet(java.lang.Object fromElement)
|
java.lang.String |
toString()
|
void |
unsetOwner(java.lang.Object owner,
int fieldNumber)
Nullifies references to the owner Object iff the passed in owner and fieldNumber match. |
Methods inherited from class java.util.TreeSet |
---|
ceiling, descendingIterator, descendingSet, floor, headSet, higher, lower, pollFirst, pollLast, subSet, tailSet |
Methods inherited from class java.util.AbstractCollection |
---|
toArray, toArray |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
---|
toArray, toArray |
Methods inherited from interface java.util.Set |
---|
toArray, toArray |
Constructor Detail |
---|
public TreeSet(java.lang.Class elementType, boolean allowNulls)
TreeSet
object.
elementType
- the element types allowedallowNulls
- true if nulls are allowedTreeSet
public TreeSet(java.lang.Class elementType, boolean allowNulls, java.util.Comparator c)
TreeSet
object that has
the specified comparator.
elementType
- the element types allowedallowNulls
- true if nulls are allowedc
- the comparator that will be used to sort this set.
A null value indicates that the elements' natural ordering should
be used.TreeSet
Method Detail |
---|
public boolean add(java.lang.Object o)
add
in interface java.util.Collection
add
in interface java.util.Set
add
in class java.util.TreeSet
o
- element to be added to this set.
TreeSet
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
addAll
in interface java.util.Set
addAll
in class java.util.TreeSet
c
- collection whose elements are to be added to this collection.
java.lang.UnsupportedOperationException
- if the addAll method is
not supported by this collection.AbstractCollection
,
TreeSet
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
remove
in interface java.util.Set
remove
in class java.util.TreeSet
o
- object to be removed from this set, if present.
TreeSet
public boolean removeAll(java.util.Collection c)
Processes each element remove internally not to have call backs into #remove(Object).
removeAll
in interface java.util.Collection
removeAll
in interface java.util.Set
removeAll
in class java.util.AbstractSet
c
- elements to be removed from this collection.
java.lang.UnsupportedOperationException
- removeAll is not supported
by this collection.TreeSet
,
AbstractCollection
public boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.Set
retainAll
in class java.util.AbstractCollection
java.lang.UnsupportedOperationException
- if the retainAll method
is not supported by this collection.TreeSet
,
AbstractCollection
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.Set
clear
in class java.util.TreeSet
TreeSet
public java.lang.Object clone()
Mutable Second Class Objects are required to provide a public clone method in order to allow for copying PersistenceCapable objects. In contrast to Object.clone(), this method must not throw a CloneNotSupportedException.
clone
in interface SCO
clone
in class java.util.TreeSet
public void reset()
SCOCollection
reset
in interface SCOCollection
SCOCollection.reset()
public void addInternal(java.lang.Object o)
SCOCollection
addInternal
in interface SCOCollection
SCOCollection.addInternal(Object o)
public void addAllInternal(java.util.Collection c)
SCOCollection
addAllInternal
in interface SCOCollection
SCOCollection.addAllInternal(Collection c)
public java.util.Collection getAdded()
SCOCollection
getAdded
in interface SCOCollection
SCOCollection.getAdded()
public java.util.Collection getRemoved()
SCOCollection
getRemoved
in interface SCOCollection
SCOCollection.getRemoved()
public void clearInternal()
SCOCollection
clearInternal
in interface SCOCollection
SCOCollection.clearInternal()
public void removeInternal(java.lang.Object o)
SCOCollection
removeInternal
in interface SCOCollection
SCOCollection.removeInternal(Object o)
public void unsetOwner(java.lang.Object owner, int fieldNumber)
SCO
unsetOwner
in interface SCO
owner
- the existing owner object.fieldNumber
- the existing number of the field.SCO.unsetOwner(Object owner, int fieldNumber)
public void setOwner(java.lang.Object owner, int fieldNumber)
SCO
setOwner
in interface SCO
owner
- the owner object.fieldNumber
- the number of the field associated with this instance.(Object owner, int fieldNumber)
public java.lang.Object getOwner()
SCO
getOwner
in interface SCO
SCO.getOwner()
public java.lang.String getFieldName()
SCO
getFieldName
in interface SCO
SCO.getFieldName()
public java.lang.Class getElementType()
SCOCollection
getElementType
in interface SCOCollection
{
public boolean allowNulls()
SCOCollection
allowNulls
in interface SCOCollection
{
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
contains
in interface java.util.Set
contains
in class java.util.TreeSet
public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Collection
containsAll
in interface java.util.Set
containsAll
in class java.util.AbstractCollection
public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.Set
isEmpty
in class java.util.TreeSet
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.NavigableSet
iterator
in interface java.util.Set
iterator
in class java.util.TreeSet
public int size()
size
in interface java.util.Collection
size
in interface java.util.Set
size
in class java.util.TreeSet
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection
equals
in interface java.util.Set
equals
in class java.util.AbstractSet
public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.Set
hashCode
in class java.util.AbstractSet
public java.lang.String toString()
toString
in class java.util.AbstractCollection
public java.util.SortedSet subSet(java.lang.Object fromElement, java.lang.Object toElement)
subSet
in interface java.util.NavigableSet
subSet
in interface java.util.SortedSet
subSet
in class java.util.TreeSet
public java.util.SortedSet headSet(java.lang.Object toElement)
headSet
in interface java.util.NavigableSet
headSet
in interface java.util.SortedSet
headSet
in class java.util.TreeSet
public java.util.SortedSet tailSet(java.lang.Object fromElement)
tailSet
in interface java.util.NavigableSet
tailSet
in interface java.util.SortedSet
tailSet
in class java.util.TreeSet
public java.util.Comparator comparator()
comparator
in interface java.util.SortedSet
comparator
in class java.util.TreeSet
public java.lang.Object first() throws java.util.NoSuchElementException
first
in interface java.util.SortedSet
first
in class java.util.TreeSet
java.util.NoSuchElementException
public java.lang.Object last() throws java.util.NoSuchElementException
last
in interface java.util.SortedSet
last
in class java.util.TreeSet
java.util.NoSuchElementException
public void setFrozen(java.lang.Object[] elements)
setFrozen
in interface SCOCollection
elements
- the frozen elements of this set.public java.util.Iterator frozenIterator()
frozenIterator
in interface SCOCollection
public java.util.Iterator eitherIterator()
eitherIterator
in interface SCOCollection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |