Validation and Constraints
Functions that enforce conditions on the stream
Gatherers
| Function | Description |
|---|---|
| ensureOrdered() | Ensure that the Comparable elements in the input stream are in the order specified, and fail exceptionally if they are not. |
| ensureOrderedBy() | Ensure that the elements in the input stream are in the order specified, as measured by the given Comparator, and fail exceptionally if they are not. |
| ensureSize() | Ensure the input stream is the proper length as specified by size |