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

Method get

src/main/java/core/org/xbill/DNS/Compression.java:59–70  ·  view source on GitHub ↗

Retrieves the position of the given name, if it has been previously included in the message. @param name The name to find in the compression table. @return The position of the name, or -1 if not found.

(Name name)

Source from the content-addressed store, hash-verified

57 * @return The position of the name, or -1 if not found.
58 */
59public int
60get(Name name) {
61 int row = (name.hashCode() & 0x7FFFFFFF) % TABLE_SIZE;
62 int pos = -1;
63 for (Entry entry = table[row]; entry != null; entry = entry.next) {
64 if (entry.name.equals(name))
65 pos = entry.pos;
66 }
67 if (verbose)
68 System.err.println("Looking for " + name + ", found " + pos);
69 return pos;
70}
71
72}

Callers

nothing calls this directly

Calls 2

hashCodeMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected