public IdentifierSet(IdentifierSet anotherSet) { super(); this.bitSet = (OpenBitSet) anotherSet.bitSet.clone(); }
public IdentifierSetReadOnly(IdentifierSet set) { this.bitSet = (OpenBitSet) set.bitSet.clone(); }
public I_RepresentIdSet duplicate() { return new IdentifierSet((OpenBitSet) bitSet.clone()); }
public DocSet union(DocSet other) { OpenBitSet newbits = (OpenBitSet)(this.getBits().clone()); newbits.or(other.getBits()); return new BitDocSet(newbits); }
public DocSet andNot(DocSet other) { OpenBitSet newbits = (OpenBitSet)(this.getBits().clone()); newbits.andNot(other.getBits()); return new BitDocSet(newbits); }
public DocSet intersection(DocSet other) { // intersection is overloaded in the smaller DocSets to be more // efficient, so dispatch off of it instead. if (!(other instanceof BitDocSet)) { return other.intersection(this); } // Default... handle with bitsets. OpenBitSet newbits = (OpenBitSet)(this.getBits().clone()); newbits.and(other.getBits()); return new BitDocSet(newbits); }
@Override public DocSet andNot(DocSet other) { OpenBitSet newbits = (OpenBitSet)(bits.clone()); if (other instanceof BitDocSet) { newbits.andNot(((BitDocSet)other).bits); } else { DocIterator iter = other.iterator(); while (iter.hasNext()) newbits.clear(iter.nextDoc()); } return new BitDocSet(newbits); }
@Override public DocSet union(DocSet other) { OpenBitSet newbits = (OpenBitSet)(bits.clone()); if (other instanceof BitDocSet) { newbits.union(((BitDocSet)other).bits); } else { DocIterator iter = other.iterator(); while (iter.hasNext()) newbits.set(iter.nextDoc()); } return new BitDocSet(newbits); }
OpenBitSet bs = (OpenBitSet)((BitDocSet)docs).getBits().clone(); bs.flip(0, maxDoc);
OpenBitSet bs = (OpenBitSet) ((BitDocSet) docs).getBits().clone(); bs.flip(0, maxDoc);
OpenBitSet neg = ((OpenBitSet)bits.clone()); neg.flip(0, bits.capacity());