MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / hashCode

Method hashCode

src/main/java/core/org/xbill/DNS/Name.java:812–821  ·  view source on GitHub ↗

Computes a hashcode based on the value

()

Source from the content-addressed store, hash-verified

810 * Computes a hashcode based on the value
811 */
812public int
813hashCode() {
814 if (hashcode != 0)
815 return (hashcode);
816 int code = 0;
817 for (int i = offset(0); i < name.length; i++)
818 code += ((code << 3) + lowercase[(name[i] & 0xFF)]);
819 hashcode = code;
820 return hashcode;
821}
822
823/**
824 * Compares this Name to another Object.

Callers 3

equalsMethod · 0.95
addMethod · 0.45
getMethod · 0.45

Calls 1

offsetMethod · 0.95

Tested by

no test coverage detected