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

Method retainAll

src/main/java/gate/relations/RelationSet.java:612–628  ·  view source on GitHub ↗
(Collection<?> relations)

Source from the content-addressed store, hash-verified

610 }
611
612 @Override
613 public boolean retainAll(Collection<?> relations) {
614 boolean modified = false;
615
616 Iterator<Relation> it = iterator();
617 while(it.hasNext()) {
618 Relation r = it.next();
619
620 if(!relations.contains(r)) {
621 //deleteRelation(r);
622 it.remove();
623 modified = true;
624 }
625 }
626
627 return modified;
628 }
629
630 @Override
631 public Object[] toArray() {

Callers

nothing calls this directly

Calls 5

iteratorMethod · 0.95
hasNextMethod · 0.65
nextMethod · 0.65
removeMethod · 0.65
containsMethod · 0.45

Tested by

no test coverage detected