ISequencedSet Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 |
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 |
ContainsAll(ICollection) |
Returns |
Disposed() |
Called when the instance has been disposed. (Inherited from IJavaPeerable) |
DisposeUnlessReferenced() |
If there are no outstanding references to this instance, then
calls |
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 |
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 |
SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from IJavaPeerable) |
SetPeerReference(JniObjectReference) |
Set the value returned by |
Size() |
Returns the number of elements in this set (its cardinality). (Inherited from ISet) |
Spliterator() |
Creates a |
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 |
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 |
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 |
JavaAs<TResult>(IJavaPeerable) |
Try to coerce |
TryJavaCast<TResult>(IJavaPeerable, TResult) |
Try to coerce |
ToEnumerable(IIterable) | |
ToEnumerable<T>(IIterable) |