MCPcopy Index your code
hub / github.com/apache/groovy / hashCode

Method hashCode

src/main/java/groovy/lang/Sequence.java:110–123  ·  view source on GitHub ↗

{@inheritDoc}

()

Source from the content-addressed store, hash-verified

108 * {@inheritDoc}
109 */
110 @Override
111 public int hashCode() {
112 if (hashCode == 0) {
113 for (int i = 0; i < size(); i++) {
114 Object value = get(i);
115 int hash = (value != null) ? value.hashCode() : 0xbabe;
116 hashCode ^= hash;
117 }
118 if (hashCode == 0) {
119 hashCode = 0xbabe;
120 }
121 }
122 return hashCode;
123 }
124
125 /**
126 * Returns the minimum allowed size for this sequence.

Calls 2

sizeMethod · 0.65
getMethod · 0.65

Tested by 4

testHashCodeMethod · 0.76