Lines Matching defs:TreeSet
26 * TreeSet is an implementation of SortedSet. All optional operations (adding
33 public class TreeSet<E> extends AbstractSet<E> implements NavigableSet<E>,
43 TreeSet(NavigableMap<E, Object> map) {
48 * Constructs a new empty instance of {@code TreeSet} which uses natural
51 public TreeSet() {
56 * Constructs a new instance of {@code TreeSet} which uses natural ordering
66 public TreeSet(Collection<? extends E> collection) {
72 * Constructs a new empty instance of {@code TreeSet} which uses the
78 public TreeSet(Comparator<? super E> comparator) {
83 * Constructs a new instance of {@code TreeSet} containing the elements of
89 public TreeSet(SortedSet<E> set) {
98 * Adds the specified object to this {@code TreeSet}.
102 * @return {@code true} when this {@code TreeSet} did not already contain
106 * {@code TreeSet}.
117 * Adds the objects in the specified collection to this {@code TreeSet}.
121 * @return {@code true} if this {@code TreeSet} was modified, {@code false}
125 * elements in this {@code TreeSet}.
136 * Removes all elements from this {@code TreeSet}, leaving it empty.
147 * Returns a new {@code TreeSet} with the same elements, size and comparator
148 * as this {@code TreeSet}.
150 * @return a shallow copy of this {@code TreeSet}.
157 TreeSet<E> clone = (TreeSet<E>) super.clone();
171 * Returns the comparator used to compare elements in this {@code TreeSet}.
180 * Searches this {@code TreeSet} for the specified object.
185 * {@code TreeSet}, {@code false} otherwise.
188 * {@code TreeSet}.
199 * Returns true if this {@code TreeSet} has no element, otherwise false.
201 * @return true if this {@code TreeSet} has no element.
210 * Returns an Iterator on the elements of this {@code TreeSet}.
212 * @return an Iterator on the elements of this {@code TreeSet}.
231 * Removes an occurrence of the specified object from this {@code TreeSet}.
235 * @return {@code true} if this {@code TreeSet} was modified, {@code false}
239 * {@code TreeSet}.
250 * Returns the number of elements in this {@code TreeSet}.
252 * @return the number of elements in this {@code TreeSet}.
261 * @exception NoSuchElementException when this TreeSet is empty
269 * @exception NoSuchElementException when this TreeSet is empty
345 : (descendingSet = new TreeSet<E>(backingMap.descendingMap()));
361 return new TreeSet<E>(backingMap.subMap(start, startInclusive, end,
382 return new TreeSet<E>(backingMap.headMap(end, endInclusive));
400 return new TreeSet<E>(backingMap.tailMap(start, startInclusive));
404 * Returns a {@code SortedSet} of the specified portion of this {@code TreeSet} which
406 * end element. The returned SortedSet is backed by this TreeSet so changes
418 * elements in this TreeSet
429 * Returns a {@code SortedSet} of the specified portion of this {@code TreeSet} which
431 * backed by this TreeSet so changes to one are reflected by the other.
439 * in this TreeSet
450 * Returns a {@code SortedSet} of the specified portion of this {@code TreeSet} which
452 * SortedSet is backed by this TreeSet so changes to one are reflected by
462 * in this TreeSet