@InterfaceAudience.Private public class CellSkipListSet extends Object implements NavigableSet<Cell>
Set of Cells implemented on top of a
ConcurrentSkipListMap. Works like a
ConcurrentSkipListSet in all but one regard:
An add will overwrite if already an entry for the added key. In other words,
where CSLS does "Adds the specified element to this set if it is not already
present.", this implementation "Adds the specified element to this set EVEN
if it is already present overwriting what was there previous". The call to
add returns true if no value in the backing map or false if there was an
entry with same key (though value may be different).
Otherwise, has same attributes as ConcurrentSkipListSet: e.g. tolerant of concurrent get and set and won't throw ConcurrentModificationException when iterating.
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
add(Cell e) |
boolean |
addAll(Collection<? extends Cell> c) |
Cell |
ceiling(Cell e) |
void |
clear() |
Comparator<? super Cell> |
comparator() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
Iterator<Cell> |
descendingIterator() |
NavigableSet<Cell> |
descendingSet() |
Cell |
first() |
Cell |
floor(Cell e) |
Cell |
get(Cell kv) |
SortedSet<Cell> |
headSet(Cell toElement) |
NavigableSet<Cell> |
headSet(Cell toElement,
boolean inclusive) |
Cell |
higher(Cell e) |
boolean |
isEmpty() |
Iterator<Cell> |
iterator() |
Cell |
last() |
Cell |
lower(Cell e) |
Cell |
pollFirst() |
Cell |
pollLast() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
NavigableSet<Cell> |
subSet(Cell fromElement,
boolean fromInclusive,
Cell toElement,
boolean toInclusive) |
SortedSet<Cell> |
subSet(Cell fromElement,
Cell toElement) |
SortedSet<Cell> |
tailSet(Cell fromElement) |
NavigableSet<Cell> |
tailSet(Cell fromElement,
boolean inclusive) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
public Cell ceiling(Cell e)
ceiling 在接口中 NavigableSet<Cell>public Iterator<Cell> descendingIterator()
descendingIterator 在接口中 NavigableSet<Cell>public NavigableSet<Cell> descendingSet()
descendingSet 在接口中 NavigableSet<Cell>public Cell floor(Cell e)
floor 在接口中 NavigableSet<Cell>public NavigableSet<Cell> headSet(Cell toElement, boolean inclusive)
headSet 在接口中 NavigableSet<Cell>public Cell higher(Cell e)
higher 在接口中 NavigableSet<Cell>public Cell lower(Cell e)
lower 在接口中 NavigableSet<Cell>public Cell pollFirst()
pollFirst 在接口中 NavigableSet<Cell>public Cell pollLast()
pollLast 在接口中 NavigableSet<Cell>public NavigableSet<Cell> subSet(Cell fromElement, boolean fromInclusive, Cell toElement, boolean toInclusive)
subSet 在接口中 NavigableSet<Cell>public NavigableSet<Cell> tailSet(Cell fromElement, boolean inclusive)
tailSet 在接口中 NavigableSet<Cell>public Comparator<? super Cell> comparator()
comparator 在接口中 SortedSet<Cell>public boolean addAll(Collection<? extends Cell> c)
public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll 在接口中 Collection<Cell>containsAll 在接口中 Set<Cell>public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.