E
- the type of elements in this sequenced setCollection<E>
, Iterable<E>
, SequencedCollection<E>
, Set<E>
NavigableSet<E>
, SortedSet<E>
ConcurrentSkipListSet
, LinkedHashSet
, TreeSet
public interface SequencedSet<E> extends SequencedCollection<E>, Set<E>
SequencedCollection
and a Set
. As such, it can be thought of either as a Set
that also has a well-defined encounter order, or as a SequencedCollection
that also has unique elements. This interface has the same requirements on the equals
and hashCode
methods as defined by Set.equals
and Set.hashCode
. Thus, a Set
and a SequencedSet
will compare equals if and only if they have equal elements, irrespective of ordering.
SequencedSet
defines the reversed()
method, which provides a reverse-ordered view of this set. The only difference from the SequencedCollection.reversed
method is that the return type of SequencedSet.reversed
is SequencedSet
.
This class is a member of the Java Collections Framework.
Modifier and Type | Method | Description |
---|---|---|
SequencedSet |
reversed() |
Returns a reverse-ordered view of this collection. |
parallelStream, removeIf, stream, toArray
addFirst, addLast, getFirst, getLast, removeFirst, removeLast
SequencedSet<E> reversed()
reversed
in interface SequencedCollection<E>
SequencedSet
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/SequencedSet.html