Sdílet prostřednictvím


ISortedSet.SubSet(Object, Object) Method

Definition

Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive.

[Android.Runtime.Register("subSet", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/SortedSet;", "GetSubSet_Ljava_lang_Object_Ljava_lang_Object_Handler:Java.Util.ISortedSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Util.ISortedSet? SubSet (Java.Lang.Object? fromElement, Java.Lang.Object? toElement);
[<Android.Runtime.Register("subSet", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/SortedSet;", "GetSubSet_Ljava_lang_Object_Ljava_lang_Object_Handler:Java.Util.ISortedSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SubSet : Java.Lang.Object * Java.Lang.Object -> Java.Util.ISortedSet

Parameters

fromElement
Object

low endpoint (inclusive) of the returned set

toElement
Object

high endpoint (exclusive) of the returned set

Returns

a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive

Attributes

Remarks

Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive. (If fromElement and toElement are equal, the returned set is empty.) The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.

The returned set will throw an IllegalArgumentException on an attempt to insert an element outside its range.

Java documentation for java.util.SortedSet.subSet(E, E).

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.

Applies to