protected class AbstractLong2DoubleSortedMap.KeySet extends AbstractLongSortedSet
| Modifier | Constructor and Description |
|---|---|
protected |
KeySet() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
LongComparator |
comparator() |
boolean |
contains(long k)
Returns
true if this collection contains the specified element. |
long |
firstLong()
Returns the first (lowest) element currently in this set.
|
LongSortedSet |
headSet(long to)
Returns a view of the portion of this sorted set whose elements are strictly less than
toElement. |
LongBidirectionalIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
LongBidirectionalIterator |
iterator(long from)
Returns a type-specific
BidirectionalIterator on the elements in
this set, starting from a given element of the domain (optional operation). |
long |
lastLong()
Returns the last (highest) element currently in this set.
|
int |
size() |
LongSortedSet |
subSet(long from,
long to)
Returns a view of the portion of this sorted set whose elements range from
fromElement, inclusive, to toElement, exclusive. |
LongSortedSet |
tailSet(long from)
Returns a view of the portion of this sorted set whose elements are greater than or equal to
fromElement. |
equals, hashCode, rem, removeadd, add, addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toLongArray, toLongArray, toStringaddAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitfirst, headSet, last, subSet, tailSetadd, contains, rem, remove, removeadd, addAll, containsAll, removeAll, removeIf, removeIf, retainAll, toArray, toLongArray, toLongArrayforEach, forEachspliteratoraddAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArrayparallelStream, streampublic boolean contains(long k)
AbstractLongCollectiontrue if this collection contains the specified element.
This implementation iterates over the elements in the collection, looking for the specified element.
contains in interface LongCollectioncontains in class AbstractLongCollectionCollection.contains(Object)public int size()
size in interface Collection<Long>size in interface Set<Long>size in class AbstractCollection<Long>public void clear()
clear in interface Collection<Long>clear in interface Set<Long>clear in class AbstractCollection<Long>public LongComparator comparator()
LongSortedSetNote that this specification strengthens the one given in SortedSet.comparator().
public long firstLong()
LongSortedSetSortedSet.first()public long lastLong()
LongSortedSetSortedSet.last()public LongSortedSet headSet(long to)
LongSortedSettoElement.
Note that this specification strengthens the one given in SortedSet.headSet(Object).
SortedSet.headSet(Object)public LongSortedSet tailSet(long from)
LongSortedSetfromElement.
Note that this specification strengthens the one given in SortedSet.headSet(Object).
SortedSet.tailSet(Object)public LongSortedSet subSet(long from, long to)
LongSortedSetfromElement, inclusive, to toElement, exclusive.
Note that this specification strengthens the one given in SortedSet.subSet(Object,Object).
SortedSet.subSet(Object,Object)public LongBidirectionalIterator iterator(long from)
LongSortedSetBidirectionalIterator on the elements in
this set, starting from a given element of the domain (optional operation).
This method returns a type-specific bidirectional iterator with given
starting point. The starting point is any element comparable to the
elements of this set (even if it does not actually belong to the
set). The next element of the returned iterator is the least element of
the set that is greater than the starting point (if there are no
elements greater than the starting point, hasNext() will return
false). The previous element of the returned iterator is
the greatest element of the set that is smaller than or equal to the
starting point (if there are no elements smaller than or equal to the
starting point, hasPrevious() will return false).
Note that passing the last element of the set as starting point and
calling previous() you can traverse the
entire set in reverse order.
from - an element to start from.public LongBidirectionalIterator iterator()
LongCollectionNote that this specification strengthens the one given in
Iterable.iterator(), which was already
strengthened in the corresponding type-specific class,
but was weakened by the fact that this interface extends Collection.
iterator in interface LongBidirectionalIterableiterator in interface LongCollectioniterator in interface LongIterableiterator in interface LongSetiterator in interface LongSortedSetiterator in interface Iterable<Long>iterator in interface Collection<Long>iterator in interface Set<Long>iterator in class AbstractLongSortedSetIterable.iterator()Copyright © 2020. All rights reserved.