MCPcopy Index your code
hub / github.com/careercup/ctci / get

Method get

java/Chapter 10/Question10_4/BitSet.java:10–14  ·  view source on GitHub ↗
(int pos)

Source from the content-addressed store, hash-verified

8 }
9
10 boolean get(int pos) {
11 int wordNumber = (pos >> 5); // divide by 32
12 int bitNumber = (pos & 0x1F); // mod 32
13 return (bitset[wordNumber] & (1 << bitNumber)) != 0;
14 }
15
16 void set(int pos) {
17 int wordNumber = (pos >> 5); // divide by 32

Callers 9

checkDuplicatesMethod · 0.95
moveToFrontMethod · 0.45
getResultsMethod · 0.45
insertResultsMethod · 0.45
getFriendsMethod · 0.45
getPersonWithIDMethod · 0.45
getMachineWithIdMethod · 0.45
getMachineIDForUserMethod · 0.45
getPersonWithIDMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected