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

Method values

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

Returns a collection view of the values contained in this map. The collection's iterator will return the values in the order that their corresponding keys appear in the tree. The collection is backed by this RBTreeMap instance, so changes to this map are reflected in the collection, and v

()

Source from the content-addressed store, hash-verified

601 * @return a collection view of the values contained in this map.
602 */
603 @Override
604 public Collection<V> values() {
605 if (values == null) {
606 values = new AbstractCollection<V>() {
607 @Override
608 public java.util.Iterator<V> iterator() {
609 return new Iterator<V>(VALUES);
610 }
611
612 @Override
613 public int size() {
614 return RBTreeMap.this.size();
615 }
616
617 @Override
618 public boolean contains(Object o) {
619 for (Entry<K,V> e = firstEntry(); e != null; e = successor(e))
620 if (valEquals(e.getValue(), o))
621 return true;
622 return false;
623 }
624
625 @Override
626 public boolean remove(Object o) {
627 for (Entry<K,V> e = firstEntry(); e != null; e = successor(e)) {
628 if (valEquals(e.getValue(), o)) {
629 deleteEntry(e);
630 return true;
631 }
632 }
633 return false;
634 }
635
636 @Override
637 public void clear() {
638 RBTreeMap.this.clear();
639 }
640 };
641 }
642 return values;
643 }
644
645 /**
646 * Returns a set view of the mappings contained in this map. The set's

Callers 15

setUpMethod · 0.45
testDiscoveryMethod · 0.45
buildMatchesMapMethod · 0.45
buildID2AnnotMapMethod · 0.45
AnnotationSetIteratorMethod · 0.45
getMethod · 0.45
inDocumentOrderMethod · 0.45
getCoveringMethod · 0.45
getContainedMethod · 0.45
indexByTypeMethod · 0.45
indexByStartOffsetMethod · 0.45

Calls

no outgoing calls

Tested by 5

setUpMethod · 0.36
testDiscoveryMethod · 0.36
buildMatchesMapMethod · 0.36
buildID2AnnotMapMethod · 0.36