[cvs] / jsr166 / src / main / java / util / NavigableSet.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/NavigableSet.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2, Tue Mar 8 12:27:06 2005 UTC revision 1.3, Tue Mar 22 01:30:10 2005 UTC
# Line 46  Line 46 
46       * @throws NullPointerException if o is <tt>null</tt>       * @throws NullPointerException if o is <tt>null</tt>
47       * and this set does not permit <tt>null</tt> elements       * and this set does not permit <tt>null</tt> elements
48       */       */
49      public E ceiling(E o);      E ceiling(E o);
50    
51      /**      /**
52       * Returns an element strictly less than the given element, or       * Returns an element strictly less than the given element, or
# Line 60  Line 60 
60       * @throws NullPointerException if o is <tt>null</tt>       * @throws NullPointerException if o is <tt>null</tt>
61       * and this set does not permit <tt>null</tt> elements       * and this set does not permit <tt>null</tt> elements
62       */       */
63      public E lower(E o);      E lower(E o);
64    
65      /**      /**
66       * Returns an element less than or equal to the given element, or       * Returns an element less than or equal to the given element, or
# Line 74  Line 74 
74       * @throws NullPointerException if o is <tt>null</tt>.       * @throws NullPointerException if o is <tt>null</tt>.
75       * and this set does not permit <tt>null</tt> elements       * and this set does not permit <tt>null</tt> elements
76       */       */
77      public E floor(E o);      E floor(E o);
78    
79      /**      /**
80       * Returns an element strictly greater than the given element, or       * Returns an element strictly greater than the given element, or
# Line 88  Line 88 
88       * @throws NullPointerException if o is <tt>null</tt>       * @throws NullPointerException if o is <tt>null</tt>
89       * and this set does not permit <tt>null</tt> elements       * and this set does not permit <tt>null</tt> elements
90       */       */
91      public E higher(E o);      E higher(E o);
92    
93      /**      /**
94       * Retrieves and removes the first (lowest) element.       * Retrieves and removes the first (lowest) element.
95       *       *
96       * @return the first element, or <tt>null</tt> if empty.       * @return the first element, or <tt>null</tt> if empty.
97       */       */
98      public E pollFirst();      E pollFirst();
99    
100      /**      /**
101       * Retrieves and removes the last (highest) element.       * Retrieves and removes the last (highest) element.
102       *       *
103       * @return the last element, or <tt>null</tt> if empty.       * @return the last element, or <tt>null</tt> if empty.
104       */       */
105      public E pollLast();      E pollLast();
106    
107      /**      /**
108       * Returns an iterator over the elements in this collection, in       * Returns an iterator over the elements in this collection, in
# Line 113  Line 113 
113      Iterator<E> descendingIterator();      Iterator<E> descendingIterator();
114    
115      /**      /**
116       * Returns a view of the portion of this set whose elements range from       * Returns a view of the portion of this set whose elements range
117       * <tt>fromElement</tt>, inclusive, to <tt>toElement</tt>, exclusive.  (If       * from <tt>fromElement</tt>, inclusive, to <tt>toElement</tt>,
118       * <tt>fromElement</tt> and <tt>toElement</tt> are equal, the returned       * exclusive.  (If <tt>fromElement</tt> and <tt>toElement</tt> are
119       * sorted set is empty.)  The returned sorted set is backed by this set,       * equal, the returned navigable set is empty.)  The returned
120       * so changes in the returned sorted set are reflected in this set, and       * navigable set is backed by this set, so changes in the returned
121       * vice-versa.       * navigable set are reflected in this set, and vice-versa. Note:
122         * This method differs from <tt>SortedSet.subSet</tt> only in that
123         * the returned set is guaranteed to support the
124         * <tt>NavigableSet</tt> interface.
125         *
126       * @param fromElement low endpoint (inclusive) of the subSet.       * @param fromElement low endpoint (inclusive) of the subSet.
127       * @param toElement high endpoint (exclusive) of the subSet.       * @param toElement high endpoint (exclusive) of the subSet.
128       * @return a view of the portion of this set whose elements range from       * @return a view of the portion of this set whose elements range from
# Line 134  Line 138 
138       *         <tt>toElement</tt> is <tt>null</tt>       *         <tt>toElement</tt> is <tt>null</tt>
139       * and this set does not permit <tt>null</tt> elements       * and this set does not permit <tt>null</tt> elements
140       */       */
141      public NavigableSet<E> subSet(E fromElement, E toElement);      NavigableSet<E> navigableSubSet(E fromElement, E toElement);
142    
143      /**      /**
144       * Returns a view of the portion of this set whose elements are strictly       * Returns a view of the portion of this set whose elements are
145       * less than <tt>toElement</tt>.  The returned sorted set is backed by       * strictly less than <tt>toElement</tt>.  The returned navigable
146       * this set, so changes in the returned sorted set are reflected in this       * set is backed by this set, so changes in the returned navigable
147       * set, and vice-versa.       * set are reflected in this set, and vice-versa.
148       * @param toElement high endpoint (exclusive) of the headSet.       * @param toElement high endpoint (exclusive) of the headSet.
149       * @return a view of the portion of this set whose elements are strictly       * @return a view of the portion of this set whose elements are strictly
150       *         less than toElement.       *         less than toElement.
# Line 150  Line 154 
154       * @throws NullPointerException if <tt>toElement</tt> is <tt>null</tt>       * @throws NullPointerException if <tt>toElement</tt> is <tt>null</tt>
155       * and this set does not permit <tt>null</tt> elements       * and this set does not permit <tt>null</tt> elements
156       */       */
157      public NavigableSet<E> headSet(E toElement);      NavigableSet<E> navigableHeadSet(E toElement);
158    
159      /**      /**
160       * Returns a view of the portion of this set whose elements are       * Returns a view of the portion of this set whose elements are
161       * greater than or equal to <tt>fromElement</tt>.  The returned       * greater than or equal to <tt>fromElement</tt>.  The returned
162       * sorted set is backed by this set, so changes in the returned       * navigable set is backed by this set, so changes in the returned
163       * sorted set are reflected in this set, and vice-versa.       * navigable set are reflected in this set, and vice-versa.
164       * @param fromElement low endpoint (inclusive) of the tailSet.       * @param fromElement low endpoint (inclusive) of the tailSet.
165       * @return a view of the portion of this set whose elements are       * @return a view of the portion of this set whose elements are
166       * greater than or equal to <tt>fromElement</tt>.       * greater than or equal to <tt>fromElement</tt>.
# Line 167  Line 171 
171       * @throws NullPointerException if <tt>fromElement</tt> is <tt>null</tt>       * @throws NullPointerException if <tt>fromElement</tt> is <tt>null</tt>
172       * and this set does not permit <tt>null</tt> elements       * and this set does not permit <tt>null</tt> elements
173       */       */
174      public NavigableSet<E> tailSet(E fromElement);      NavigableSet<E> navigableTailSet(E fromElement);
175  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8