Home
last modified time | relevance | path

Searched refs:bitIndex (Results 1 – 2 of 2) sorted by relevance

/libcore/ojluni/src/main/java/java/math/
DBitSieve.java134 private static int unitIndex(int bitIndex) { in unitIndex() argument
135 return bitIndex >>> 6; in unitIndex()
141 private static long bit(int bitIndex) { in bit() argument
142 return 1L << (bitIndex & ((1<<6) - 1)); in bit()
148 private boolean get(int bitIndex) { in get() argument
149 int unitIndex = unitIndex(bitIndex); in get()
150 return ((bits[unitIndex] & bit(bitIndex)) != 0); in get()
156 private void set(int bitIndex) { in set() argument
157 int unitIndex = unitIndex(bitIndex); in set()
158 bits[unitIndex] |= bit(bitIndex); in set()
/libcore/ojluni/src/main/java/java/util/
DBitSet.java111 private static int wordIndex(int bitIndex) { in wordIndex() argument
112 return bitIndex >> ADDRESS_BITS_PER_WORD; in wordIndex()
378 public void flip(int bitIndex) { in flip() argument
379 if (bitIndex < 0) in flip()
380 throw new IndexOutOfBoundsException("bitIndex < 0: " + bitIndex); in flip()
382 int wordIndex = wordIndex(bitIndex); in flip()
385 words[wordIndex] ^= (1L << bitIndex); in flip()
442 public void set(int bitIndex) { in set() argument
443 if (bitIndex < 0) in set()
444 throw new IndexOutOfBoundsException("bitIndex < 0: " + bitIndex); in set()
[all …]