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

Method entrySet

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

Returns a set view of the mappings contained in this map. The set's iterator returns the mappings in ascending key order. Each element in the returned set is a Map.Entry . The set is backed by this map, so changes to this map are reflected in the set, and vice-versa. The set supports elem

()

Source from the content-addressed store, hash-verified

656 * @return a set view of the mappings contained in this map.
657 */
658 @Override
659 public Set<Map.Entry<K,V>> entrySet() {
660 if (entrySet == null) {
661 entrySet = new AbstractSet<Map.Entry<K,V>>() {
662 @Override
663 public java.util.Iterator<Map.Entry<K,V>> iterator() {
664 return new Iterator<Map.Entry<K,V>>(ENTRIES);
665 }
666
667 @Override
668 public boolean contains(Object o) {
669 if (!(o instanceof Map.Entry))
670 return false;
671 @SuppressWarnings("unchecked")
672 Map.Entry<K,V> entry = (Map.Entry<K,V>)o;
673 Object value = entry.getValue();
674 Entry<K,V> p = getEntry(entry.getKey());
675 return p != null && valEquals(p.getValue(), value);
676 }
677
678 @Override
679 public boolean remove(Object o) {
680 if (!(o instanceof Map.Entry))
681 return false;
682 @SuppressWarnings("unchecked")
683 Map.Entry<K,V> entry = (Map.Entry<K,V>)o;
684 Object value = entry.getValue();
685 Entry<K,V> p = getEntry(entry.getKey());
686 if (p != null && valEquals(p.getValue(), value)) {
687 deleteEntry(p);
688 return true;
689 }
690 return false;
691 }
692
693 @Override
694 public int size() {
695 return RBTreeMap.this.size();
696 }
697
698 @Override
699 public void clear() {
700 RBTreeMap.this.clear();
701 }
702 };
703 }
704 return entrySet;
705 }
706
707 /**
708 * Returns a view of the portion of this map whose keys range from

Callers 15

writeObjectMethod · 0.95
shortenUriStringMethod · 0.45
getTypeFromContentMethod · 0.45
duplicateMethod · 0.45
refreshTreeForPluginsMethod · 0.45
writeDocumentMethod · 0.45
unpackCasMarkupMethod · 0.45
writeDocumentMethod · 0.45
writeXcesAnnotationsMethod · 0.45
changeKeyValueMethod · 0.45
getAllInstancesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected