/** * {@inheritDoc} */ public String toString() { StringBuilder buf = new StringBuilder("w="); buf.append(names.length); int i = nextSetBit(0); while (i >= 0) { buf.append(", ").append(i).append("="); buf.append(BitSetENTCacheImpl.this.getName(i)); i = nextSetBit(i + 1); } return buf.toString(); }
/** * {@inheritDoc} */ public String toString() { StringBuilder buf = new StringBuilder("w="); buf.append(names.length); int i = nextSetBit(0); while (i >= 0) { buf.append(", ").append(i).append("="); buf.append(BitSetENTCacheImpl.this.getName(i)); i = nextSetBit(i + 1); } return buf.toString(); }
/** * Creates a new bit set key. * @param bits the array of bits * @param numBits the number of bits that are '1' in the given bits */ private BitSetKey(long[] bits, int numBits) { this.bits = bits; names = new Name[numBits]; int i = nextSetBit(0); int j = 0; while (i >= 0) { names[j++] = BitSetENTCacheImpl.this.getName(i); i = nextSetBit(i + 1); } hashCode = calcHashCode(); }
/** * Creates a new bit set key. * @param bits the array of bits * @param numBits the number of bits that are '1' in the given bits */ private BitSetKey(long[] bits, int numBits) { this.bits = bits; names = new Name[numBits]; int i = nextSetBit(0); int j = 0; while (i >= 0) { names[j++] = BitSetENTCacheImpl.this.getName(i); i = nextSetBit(i + 1); } hashCode = calcHashCode(); }