Top Description Methods
java.util

public Interface SequencedSet<E>

extends SequencedCollection<E>, Set<E>
Known Direct Subinterfaces
java.util.SortedSet
Known Direct Implementers
java.util.Collections.UnmodifiableSequencedSet, java.util.Collections.SequencedSetFromMap, java.util.LinkedHashMap.LinkedKeySet, java.util.LinkedHashMap.LinkedEntrySet, java.util.LinkedHashSet
Type Parameters
<E>
the type of elements in this sequenced set

A collection that is both a 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.

Since
21

Method Summary

Modifier and TypeMethod and Description
public SequencedSet<E>

Returns:

a reverse-ordered view of this collection, as a SequencedSet
reversed
()

Redeclares java.util.SequencedCollection.reversed.

Returns a reverse-ordered view of this collection.

Inherited from java.util.SequencedCollection:
addFirstaddLastgetFirstgetLastremoveFirstremoveLast
Inherited from java.util.Set:
addaddAllclearcontainscontainsAllcopyOfequalshashCodeisEmptyiteratorofofofofofofofofofofofofremoveremoveAllretainAllsizespliteratortoArraytoArray

Method Detail

reversedback to summary
public SequencedSet<E> reversed()

Redeclares java.util.SequencedCollection.reversed.

Doc from java.util.SequencedCollection.reversed.

Returns a reverse-ordered view of this collection. The encounter order of elements in the returned view is the inverse of the encounter order of elements in this collection. The reverse ordering affects all order-sensitive operations, including those on the view collections of the returned view. If the collection implementation permits modifications to this view, the modifications "write through" to the underlying collection. Changes to the underlying collection might or might not be visible in this reversed view, depending upon the implementation.

Returns:SequencedSet<E>

a reverse-ordered view of this collection, as a SequencedSet