Code example for BitSet

Methods: clone

0
  private final int length;
   
  public LogicalBitSetVector(BitSet bitSet, int length, AttributeMap attributes) {
    super(attributes);
    this.length = length;
    this.bitSet = (BitSet) bitSet.clone();
  } 
 
  public LogicalBitSetVector(BitSet bitSet, int length) {
    this.bitSet = (BitSet) bitSet.clone();
    this.length = length;
  } 
 
  @Override 
  public int length() { 
    return length;
  } 
 
  @Override 
  public int getElementAsRawLogical(int index) {
    return bitSet.get(index) ? 1 : 0;