Share via


ISequencedSet Interface

Definition

A collection that is both a SequencedCollection and a Set.

[Android.Runtime.Register("java/util/SequencedSet", "", "Java.Util.ISequencedSetInvoker", ApiSince=35)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
public interface ISequencedSet : IDisposable, Java.Interop.IJavaPeerable, Java.Util.ISequencedCollection, Java.Util.ISet
[<Android.Runtime.Register("java/util/SequencedSet", "", "Java.Util.ISequencedSetInvoker", ApiSince=35)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
type ISequencedSet = interface
    interface ISequencedCollection
    interface ICollection
    interface IIterable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
    interface ISet
Derived
Attributes
Implements

Remarks

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 Set.equals and Set#hashCode 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 SequencedCollection.reversed method is that the return type of SequencedSet.reversed is SequencedSet.

This class is a member of the Java Collections Framework.

Added in 21.

Java documentation for java.util.SequencedSet.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Properties

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
IsEmpty

Returns true if this set has no elements.

(Inherited from ISet)
JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)

Methods

Add(Object)

Adds the specified element to this set if it is not already present (optional operation).

(Inherited from ISet)
AddAll(ICollection)

Adds all of the elements in the specified collection to this set if they're not already present (optional operation).

(Inherited from ISet)
AddFirst(Object)

Adds an element as the first element of this collection (optional operation).

(Inherited from ISequencedCollection)
AddLast(Object)

Adds an element as the last element of this collection (optional operation).

(Inherited from ISequencedCollection)
Clear()

Removes all of the elements from this set (optional operation).

(Inherited from ISet)
Contains(Object)

Returns true if this set contains the specified element.

(Inherited from ISet)
ContainsAll(ICollection)

Returns true if this set contains all of the elements of the specified collection.

(Inherited from ISet)
Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Equals(Object)

Compares the specified object with this set for equality.

(Inherited from ISet)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
ForEach(IConsumer)

Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception.

(Inherited from IIterable)
GetFirst()

Gets the first element of this collection.

(Inherited from ISequencedCollection)
GetHashCode()

Returns the hash code value for this set.

(Inherited from ISet)
GetLast()

Gets the last element of this collection.

(Inherited from ISequencedCollection)
Iterator()

Returns an iterator over the elements in this set.

(Inherited from ISet)
Remove(Object)

Removes the specified element from this set if it is present (optional operation).

(Inherited from ISet)
RemoveAll(ICollection)

Removes from this set all of its elements that are contained in the specified collection (optional operation).

(Inherited from ISet)
RemoveFirst()

Removes and returns the first element of this collection (optional operation).

(Inherited from ISequencedCollection)
RemoveIf(IPredicate)

Removes all of the elements of this collection that satisfy the given predicate.

(Inherited from ICollection)
RemoveLast()

Removes and returns the last element of this collection (optional operation).

(Inherited from ISequencedCollection)
RetainAll(ICollection)

Retains only the elements in this set that are contained in the specified collection (optional operation).

(Inherited from ISet)
Reversed()

Returns a reverse-ordered view of this collection.

(Inherited from ISequencedCollection)
SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
Size()

Returns the number of elements in this set (its cardinality).

(Inherited from ISet)
Spliterator()

Creates a Spliterator over the elements described by this Iterable.

(Inherited from IIterable)
ToArray()

Returns an array containing all of the elements in this set.

(Inherited from ISet)
ToArray(IIntFunction)

Returns an array containing all of the elements in this collection, using the provided generator function to allocate the returned array.

(Inherited from ICollection)
ToArray(Object[])

Returns an array containing all of the elements in this set; the runtime type of the returned array is that of the specified array.

(Inherited from ISet)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Explicit Interface Implementations

IIterable.Spliterator()

Creates a Spliterator over the elements in this set.

(Inherited from ISet)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

ToEnumerable(IIterable)
ToEnumerable<T>(IIterable)

Applies to