Comparable or according to a given
Comparator.
Note that the contract defined here is can't be totally applied to List (that's why its name is not SortedAssert), the differences being that we can't check that - for empty List - the list parameter is comparable or compatible with given comparator due to type erasure.
| Modifier and Type | Method and Description |
|---|---|
| public SELF | Returns: this assertion object.Verifies that the actual array is sorted in ascending order according to the natural ordering of its elements. |
| public SELF | Returns: this assertion object.the comparator)Comparator used to compare array elementsVerifies that the actual array is sorted according to the given comparator. |
| isSorted | back to summary |
|---|---|
| public SELF isSorted() Verifies that the actual array is sorted in ascending order according to the natural ordering of its elements.
All array elements must be primitive or implement the
| |
| isSortedAccordingTo | back to summary |
|---|---|
| public SELF isSortedAccordingTo(Comparator<? super ELEMENT> comparator) Verifies that the actual array is sorted according to the given comparator.
| |