public class TreeSet extends java.util.TreeSet implements SCOCollection
TreeSet,
Serialized Form| Constructor and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
ceiling, descendingIterator, descendingSet, floor, headSet, higher, lower, pollFirst, pollLast, subSet, tailSetpublic TreeSet(java.lang.Class elementType,
boolean allowNulls)
TreeSet object.elementType - the element types allowedallowNulls - true if nulls are allowedTreeSetpublic 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.TreeSetpublic boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Setadd in class java.util.TreeSeto - element to be added to this set.TreeSetpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.SetaddAll in class java.util.TreeSetc - collection whose elements are to be added to this collection.java.lang.UnsupportedOperationException - if the addAll method is
not supported by this collection.AbstractCollection,
TreeSetpublic boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Setremove in class java.util.TreeSeto - object to be removed from this set, if present.TreeSetpublic boolean removeAll(java.util.Collection c)
Processes each element remove internally not to have call backs into #remove(Object).
removeAll in interface java.util.CollectionremoveAll in interface java.util.SetremoveAll in class java.util.AbstractSetc - elements to be removed from this collection.java.lang.UnsupportedOperationException - removeAll is not supported
by this collection.TreeSet,
AbstractCollectionpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionretainAll in interface java.util.SetretainAll in class java.util.AbstractCollectionjava.lang.UnsupportedOperationException - if the retainAll method
is not supported by this collection.TreeSet,
AbstractCollectionpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Setclear in class java.util.TreeSetTreeSetpublic 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.
public void reset()
SCOCollectionreset in interface SCOCollectionSCOCollection.reset()public void addInternal(java.lang.Object o)
SCOCollectionaddInternal in interface SCOCollectionSCOCollection.addInternal(Object o)public void addAllInternal(java.util.Collection c)
SCOCollectionaddAllInternal in interface SCOCollectionSCOCollection.addAllInternal(Collection c)public java.util.Collection getAdded()
SCOCollectiongetAdded in interface SCOCollectionSCOCollection.getAdded()public java.util.Collection getRemoved()
SCOCollectiongetRemoved in interface SCOCollectionSCOCollection.getRemoved()public void clearInternal()
SCOCollectionclearInternal in interface SCOCollectionSCOCollection.clearInternal()public void removeInternal(java.lang.Object o)
SCOCollectionremoveInternal in interface SCOCollectionSCOCollection.removeInternal(Object o)public void unsetOwner(java.lang.Object owner,
int fieldNumber)
SCOunsetOwner in interface SCOowner - 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)
SCOsetOwner in interface SCOowner - the owner object.fieldNumber - the number of the field associated with this instance.(Object owner, int fieldNumber)public java.lang.Object getOwner()
SCOgetOwner in interface SCOSCO.getOwner()public java.lang.String getFieldName()
SCOgetFieldName in interface SCOSCO.getFieldName()public java.lang.Class getElementType()
SCOCollectiongetElementType in interface SCOCollection{public boolean allowNulls()
SCOCollectionallowNulls in interface SCOCollection{public boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.Setcontains in class java.util.TreeSetpublic boolean containsAll(java.util.Collection c)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.SetcontainsAll in class java.util.AbstractCollectionpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.SetisEmpty in class java.util.TreeSetpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.NavigableSetiterator in interface java.util.Setiterator in class java.util.TreeSetpublic int size()
size in interface java.util.Collectionsize in interface java.util.Setsize in class java.util.TreeSetpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collectionequals in interface java.util.Setequals in class java.util.AbstractSetpublic int hashCode()
hashCode in interface java.util.CollectionhashCode in interface java.util.SethashCode in class java.util.AbstractSetpublic java.lang.String toString()
toString in class java.util.AbstractCollectionpublic java.util.SortedSet subSet(java.lang.Object fromElement,
java.lang.Object toElement)
subSet in interface java.util.NavigableSetsubSet in interface java.util.SortedSetsubSet in class java.util.TreeSetpublic java.util.SortedSet headSet(java.lang.Object toElement)
headSet in interface java.util.NavigableSetheadSet in interface java.util.SortedSetheadSet in class java.util.TreeSetpublic java.util.SortedSet tailSet(java.lang.Object fromElement)
tailSet in interface java.util.NavigableSettailSet in interface java.util.SortedSettailSet in class java.util.TreeSetpublic java.util.Comparator comparator()
comparator in interface java.util.SortedSetcomparator in class java.util.TreeSetpublic java.lang.Object first()
throws java.util.NoSuchElementException
first in interface java.util.SortedSetfirst in class java.util.TreeSetjava.util.NoSuchElementExceptionpublic java.lang.Object last()
throws java.util.NoSuchElementException
last in interface java.util.SortedSetlast in class java.util.TreeSetjava.util.NoSuchElementExceptionpublic void setFrozen(java.lang.Object[] elements)
setFrozen in interface SCOCollectionelements - the frozen elements of this set.public java.util.Iterator frozenIterator()
frozenIterator in interface SCOCollectionpublic java.util.Iterator eitherIterator()
eitherIterator in interface SCOCollectionCopyright © 2005-2012 Apache Software Foundation. All Rights Reserved.