MCPcopy Create free account
hub / github.com/GateNLP/gate-core / keySet

Method keySet

src/main/java/gate/util/RBTreeMap.java:556–588  ·  view source on GitHub ↗

Returns a Set view of the keys contained in this map. The set's iterator will return the keys in ascending order. The map is backed by this RBTreeMap instance, so changes to this map are reflected in the Set, and vice-versa. The Set supports element removal, which removes the correspondi

()

Source from the content-addressed store, hash-verified

554 * @return a set view of the keys contained in this RBTreeMap.
555 */
556 @Override
557 public Set<K> keySet() {
558 if (keySet == null) {
559 keySet = new AbstractSet<K>() {
560
561 @Override
562 public java.util.Iterator<K> iterator() {
563 return new Iterator<K>(KEYS);
564 }
565
566 @Override
567 public int size() {
568 return RBTreeMap.this.size();
569 }
570
571 @Override
572 public boolean contains(Object o) {
573 return containsKey(o);
574 }
575
576 @Override
577 public boolean remove(Object o) {
578 return RBTreeMap.this.remove(o) != null;
579 }
580
581 @Override
582 public void clear() {
583 RBTreeMap.this.clear();
584 }
585 };
586 }
587 return keySet;
588 }
589
590 /**
591 * Returns a collection view of the values contained in this map. The

Callers 15

verifyIDConsistencyMethod · 0.45
addAnnotSet2MapMethod · 0.45
testSubsumeMethod · 0.45
testWithfeatMethod · 0.45
getSupportedMimeTypesMethod · 0.45
itemStateChangedMethod · 0.45
buildGuiMethod · 0.45
getMethod · 0.45
getAllTypesMethod · 0.45

Calls

no outgoing calls

Tested by 6

verifyIDConsistencyMethod · 0.36
addAnnotSet2MapMethod · 0.36
testSubsumeMethod · 0.36
testWithfeatMethod · 0.36