Package org.apache.calcite.util
Class ImmutableBitSet.Builder
java.lang.Object
org.apache.calcite.util.ImmutableBitSet.Builder
- Enclosing class:
- ImmutableBitSet
Builder.
- 
Method SummaryModifier and TypeMethodDescriptionSets all bits in a given list of bits.addAll(ImmutableBitSet bitSet) Sets all bits in a given bit set.addAll(ImmutableIntList integers) Sets all bits in a given list ofints.build()Builds an ImmutableBitSet from the contents of this Builder.build(ImmutableBitSet bitSet) Builds an ImmutableBitSet from the contents of this Builder, using an existing ImmutableBitSet if it happens to have the same contents.Builds an ImmutableBitSet from the contents of this Builder.intReturns the number of set bits.clear(int bit) combine(ImmutableBitSet.Builder builder) Merges another builder.booleanget(int bitIndex) voidintersect(ImmutableBitSet that) booleanisEmpty()removeAll(ImmutableBitSet bitSet) Clears all bits in a given bit set.set(int bit) set(int fromIndex, int toIndex) Sets a range of bits, fromfromtoto- 1.booleanwouldEqual(ImmutableBitSet bitSet) Returns whether the bit set that would be created by this Builder would equal a given bit set.
- 
Method Details- 
buildBuilds an ImmutableBitSet from the contents of this Builder.After calling this method, the Builder cannot be used again. 
- 
buildAndResetBuilds an ImmutableBitSet from the contents of this Builder.After calling this method, the Builder may be used again. 
- 
buildBuilds an ImmutableBitSet from the contents of this Builder, using an existing ImmutableBitSet if it happens to have the same contents.Supplying the existing bit set if useful for set operations, where there is a significant chance that the original bit set is unchanged. We save memory because we use the same copy. For example: ImmutableBitSet primeNumbers; ImmutableBitSet hundreds = ImmutableBitSet.of(100, 200, 300); return primeNumbers.except(hundreds); After calling this method, the Builder cannot be used again. 
- 
set
- 
getpublic boolean get(int bitIndex) 
- 
clear
- 
wouldEqualReturns whether the bit set that would be created by this Builder would equal a given bit set.
- 
cardinalitypublic int cardinality()Returns the number of set bits.
- 
combineMerges another builder. Does not modify the other builder.
- 
addAllSets all bits in a given bit set.
- 
addAllSets all bits in a given list of bits.
- 
addAllSets all bits in a given list ofints.
- 
removeAllClears all bits in a given bit set.
- 
setSets a range of bits, fromfromtoto- 1.
- 
isEmptypublic boolean isEmpty()
- 
intersect
 
-