MCPcopy Create free account
hub / github.com/ReadyTalk/avian / contains

Method contains

classpath/java/util/AbstractCollection.java:36–52  ·  view source on GitHub ↗
(Object element)

Source from the content-addressed store, hash-verified

34 }
35
36 public boolean contains(Object element) {
37 if (element != null) {
38 for (Iterator<T> iter = iterator(); iter.hasNext();) {
39 if (element.equals(iter.next())) {
40 return true;
41 }
42 }
43 } else {
44 for (Iterator<T> iter = iterator(); iter.hasNext();) {
45 if (iter.next()==null) {
46 return true;
47 }
48 }
49
50 }
51 return false;
52 }
53
54 public boolean containsAll(Collection<?> c) {
55 if (c == null) {

Callers 1

containsAllMethod · 0.95

Calls 4

iteratorMethod · 0.95
hasNextMethod · 0.65
equalsMethod · 0.65
nextMethod · 0.65

Tested by

no test coverage detected