1 /*
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * This code is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 only, as
6 * published by the Free Software Foundation. Oracle designates this
7 * particular file as subject to the "Classpath" exception as provided
8 * by Oracle in the LICENSE file that accompanied this code.
9 *
10 * This code is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 */
24
25 /*
26 * This file is available under and governed by the GNU General Public
27 * License version 2 only, as published by the Free Software Foundation.
28 * However, the following notice accompanied the original version of this
29 * file:
30 *
31 * Written by Doug Lea and Josh Bloch with assistance from members of JCP
32 * JSR-166 Expert Group and released to the public domain, as explained at
33 * http://creativecommons.org/publicdomain/zero/1.0/
34 */
35
36 // BEGIN android-note
37 // removed link to collections framework docs
38 // END android-note
39
40
41 package java.util;
42
43 @SuppressWarnings({"unchecked", "deprecation", "all"})
44 public interface NavigableSet<E> extends java.util.SortedSet<E> {
45
lower(E e)46 public E lower(E e);
47
floor(E e)48 public E floor(E e);
49
ceiling(E e)50 public E ceiling(E e);
51
higher(E e)52 public E higher(E e);
53
pollFirst()54 public E pollFirst();
55
pollLast()56 public E pollLast();
57
58 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
iterator()59 public java.util.Iterator<E> iterator();
60
descendingSet()61 public java.util.NavigableSet<E> descendingSet();
62
descendingIterator()63 public java.util.Iterator<E> descendingIterator();
64
subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)65 public java.util.NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive);
66
headSet(E toElement, boolean inclusive)67 public java.util.NavigableSet<E> headSet(E toElement, boolean inclusive);
68
tailSet(E fromElement, boolean inclusive)69 public java.util.NavigableSet<E> tailSet(E fromElement, boolean inclusive);
70
subSet(E fromElement, E toElement)71 public java.util.SortedSet<E> subSet(E fromElement, E toElement);
72
headSet(E toElement)73 public java.util.SortedSet<E> headSet(E toElement);
74
tailSet(E fromElement)75 public java.util.SortedSet<E> tailSet(E fromElement);
76
removeFirst()77 public default E removeFirst() { throw new RuntimeException("Stub!"); }
78
removeLast()79 public default E removeLast() { throw new RuntimeException("Stub!"); }
80
81 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
reversed()82 public default java.util.NavigableSet<E> reversed() { throw new RuntimeException("Stub!"); }
83 }
84
85