List of usage examples for java.util NavigableSet tailSet
SortedSet<E> tailSet(E fromElement);
Equivalent to tailSet(fromElement, true) .
From source file:org.apache.hadoop.hbase.regionserver.Memcache.java
private boolean remove(final NavigableSet<KeyValue> set, final KeyValue kv) { SortedSet<KeyValue> s = set.tailSet(kv); if (s.isEmpty()) { return false; }/*from w w w . j ava2 s . c om*/ boolean removed = false; for (KeyValue k : s) { if (this.comparatorIgnoreType.compare(k, kv) == 0) { // Same r/c/ts. Remove it. s.remove(k); removed = true; continue; } break; } return removed; }