Code example for BitSet

Methods: get

0
    return length;
  } 
 
  @Override 
  public int getElementAsRawLogical(int index) {
    return bitSet.get(index) ? 1 : 0;
  } 
   
  @Override 
  public Logical getElementAsLogical(int index) {
    return bitSet.get(index) ? Logical.TRUE : Logical.FALSE;
  } 
 
  @Override 
  protected SEXP cloneWithNewAttributes(AttributeMap attributes) {
    return new LogicalBitSetVector(this.bitSet, length, attributes);
  } 
   
}