Package uk.ac.starlink.topcat
Class BitsRowSubset
java.lang.Object
uk.ac.starlink.topcat.RowSubset
uk.ac.starlink.topcat.BitsRowSubset
A RowSubset which maintains the inclusion status of each row as
a separate flag.
- Author:
- Mark Taylor (Starlink)
-
Nested Class Summary
Nested classes/interfaces inherited from class uk.ac.starlink.topcat.RowSubset
RowSubset.Key -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBitsRowSubset(String name, BitSet bits) Constructs a new row subset with a given BitSet and name.BitsRowSubset(String name, BitSet bits, boolean invert) Constructs a new row subset with a given BitSet, name and sense. -
Method Summary
Modifier and TypeMethodDescriptionReturns theBitSetobject used to store the inclusion status flags.booleanReturns the inversion sense of the inclusion flags represented by this subset relative to the bit set.booleanisIncluded(long lrow) Indicates whether a given row is in the subset or not.
-
Constructor Details
-
BitsRowSubset
Constructs a new row subset with a given BitSet, name and sense. Theinvertargument indicates whether the sense of the bit set is to be reversed prior to interpretation.- Parameters:
name- subset namebits- flag vectorinvert- whether to invert the bits from the BitSet
-
BitsRowSubset
Constructs a new row subset with a given BitSet and name. Same asBitsRowSubset(name,bits,false)- Parameters:
name- subset namebits- flag vector
-
-
Method Details
-
getBitSet
Returns theBitSetobject used to store the inclusion status flags.- Returns:
- flag vector
-
getInvert
public boolean getInvert()Returns the inversion sense of the inclusion flags represented by this subset relative to the bit set.- Returns:
- true iff bitset bits are inverted to give inclusion flag
-
isIncluded
public boolean isIncluded(long lrow) Description copied from class:RowSubsetIndicates whether a given row is in the subset or not.- Specified by:
isIncludedin classRowSubset- Parameters:
lrow- the index of the row in question- Returns:
trueiff rowlrowis to be included
-