|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SortedSet<E>
SortedSet defines the interface for sets that are sorted.
| Method Summary | |
|---|---|
SortedSet<E> |
add(E value)
Returns a set that adds the specified value if it doesn't already exist in this set. |
SortedSet<E> |
asSortedSet()
Returns an immutable view of this set as an instance of java.util.SortedSet. |
Comparator<? super E> |
comparator()
Returns the comparator associated with this map, or null if the default ordering is used. |
SortedSet<E> |
drop(int number)
Returns a set containing all elements in this set, excluding the first number of elements. |
E |
first()
Returns the first element in the set or null of the set is empty. |
SortedSet<E> |
from(E value,
boolean inclusive)
Returns the bottom of the set starting from the key specified. |
E |
last()
Returns the last element in the set or null of the set is empty. |
SortedSet<E> |
range(E from,
boolean fromInclusive,
E to,
boolean toInclusive)
Returns a subset of the set between the from and to keys specified. |
SortedSet<E> |
remove(E value)
Removes the specified value from the set if it exists. |
SortedSet<E> |
take(int number)
Returns a set containing the first number of elements from this set. |
SortedSet<E> |
to(E value,
boolean inclusive)
Returns the top of the set up until the key specified. |
| Methods inherited from interface com.github.andrewoma.dexx.collection.Set |
|---|
asSet, contains |
| Methods inherited from interface com.github.andrewoma.dexx.collection.Iterable |
|---|
iterator |
| Methods inherited from interface com.github.andrewoma.dexx.collection.Traversable |
|---|
forEach, isEmpty, makeString, makeString, size, to, toArray, toArray, toIndexedList, toSet, toSortedSet |
| Method Detail |
|---|
@Nullable E first()
null of the set is empty.
@Nullable E last()
null of the set is empty.
@NotNull SortedSet<E> drop(int number)
number of elements.
@NotNull SortedSet<E> take(int number)
number of elements from this set.
@NotNull SortedSet<E> add(E value)
Set
add in interface Set<E>@NotNull SortedSet<E> remove(E value)
Set
remove in interface Set<E>Comparator<? super E> comparator()
null if the default ordering is used.
@NotNull
SortedSet<E> from(@NotNull
E value,
boolean inclusive)
inclusive - if true, the key will be included in the result, otherwise it will be excluded
@NotNull
SortedSet<E> to(@NotNull
E value,
boolean inclusive)
inclusive - if true, the key will be included in the result, otherwise it will be excluded
@NotNull
SortedSet<E> range(@NotNull
E from,
boolean fromInclusive,
@NotNull
E to,
boolean toInclusive)
from and to keys specified.
fromInclusive - if true, the key will be included in the result, otherwise it will be excludedtoInclusive - if true, the key will be included in the result, otherwise it will be excluded@NotNull SortedSet<E> asSortedSet()
java.util.SortedSet.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||