SpliteratorCharacteristics Enum
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.
Specifies the source and traversal properties reported by a spliterator.
public enum SpliteratorCharacteristics
type SpliteratorCharacteristics =
- Inheritance
-
SpliteratorCharacteristics
Fields
| Name | Value | Description |
|---|---|---|
| Distinct | 1 | Indicates that no two encountered elements are equal under Java equality. A spliterator with this characteristic can contain at most one null element. For example, a spliterator based on a set can report this characteristic. |
| Sorted | 4 | Encounter order follows a defined sort order. Comparator returns the associated comparator, or |
| Ordered | 16 | An encounter order is defined for the elements. TrySplit() splits a strict prefix, TryAdvance(IConsumer) advances one element in prefix order, and ForEachRemaining(IConsumer) performs actions in encounter order. A collection has an encounter order if its Iterator() method documents an order; the encounter order is the same as that order. Otherwise, the collection has no encounter order. |
| Sized | 64 | The value returned by EstimateSize() before traversal or splitting is a finite size. If the source is not structurally modified, it is the exact number of elements that a complete traversal would encounter. |
| Nonnull | 256 | Characteristic value signifying that the source guarantees that encountered elements will not be null. (This applies, for example, to most concurrent collections, queues, and maps.) |
| Immutable | 1024 | The element source cannot be structurally modified: elements cannot be added, replaced, or removed during traversal. A spliterator that reports neither |
| Concurrent | 4096 | The element source can be modified concurrently by multiple threads without external synchronization. The spliterator should document the effect of modifications during traversal. A top-level spliterator should not report both |
| Subsized | 16384 | All spliterators returned by TrySplit() report both Sized and |
Remarks
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.