Class RowSubset
java.lang.Object
uk.ac.starlink.topcat.RowSubset
- Direct Known Subclasses:
BitsRowSubset, BooleanColumnRowSubset, InverseRowSubset, SingleRowSubset, SyntheticRowSubset
Defines a selection of rows in a table model.
- Author:
- Mark Taylor (Starlink)
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetKey()Returns the key identifying this subset.Returns the mask identifier by which the content of this subset is recognised.getName()Returns the name of this subset.abstract booleanisIncluded(long lrow) Indicates whether a given row is in the subset or not.voidsetKey(RowSubset.Key key) Sets the key identifying this subset.voidSets the name of this subset.toString()Returns this subset's name.
-
Field Details
-
ALL
A subset containing all rows (isIncludedalways true). -
NONE
A subset containing no rows (isIncludedalways false).
-
-
Constructor Details
-
RowSubset
-
-
Method Details
-
getName
-
setName
-
getKey
Returns the key identifying this subset. This value is intended for use by the GUI; only one subset in use may have the same key at any one time, but if a subset goes out of use, its key may be passed on to a different one that is intended as a replacement that should inherit configuration set up for the original owner.- Returns:
- identifer
-
setKey
Sets the key identifying this subset. A key no longer in use may be passed on to a new subset intended as its replacement.- Parameters:
key- new key
-
isIncluded
public abstract boolean isIncluded(long lrow) Indicates whether a given row is in the subset or not.- Parameters:
lrow- the index of the row in question- Returns:
trueiff rowlrowis to be included
-
getMaskId
Returns the mask identifier by which the content of this subset is recognised.In particular this value is used as a
maskIdby theGuiDataSpecclass, which means that changing it will generally signal to the plotting system that the content of this subset has changed, and thus provoke a replot of layers dependent on it.The default implementation returns a value determined by the identity of this RowSubset object (
TopcatUtils.identityString(Object)), but this method may be overridden by subclasses that wish to signal their changes, and in particular provoke replots, according to state. Implementations are not however obliged to make this value reflect their internal state, especially if it would be expensive to do so. Implementations should be fast.- Returns:
- mask content identifier
-
toString
-