public abstract class RowSubset extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RowSubset.Key
Class used as subset identifier.
|
Modifier and Type | Field and Description |
---|---|
static RowSubset |
ALL
A subset containing all rows (
isIncluded always true). |
static RowSubset |
NONE
A subset containing no rows (
isIncluded always false). |
Modifier and Type | Method and Description |
---|---|
RowSubset.Key |
getKey()
Returns the key identifying this subset.
|
String |
getMaskId()
Returns the mask identifier by which the content of this subset
is recognised.
|
String |
getName()
Returns the name of this subset.
|
abstract boolean |
isIncluded(long lrow)
Indicates whether a given row is in the subset or not.
|
void |
setKey(RowSubset.Key key)
Sets the key identifying this subset.
|
void |
setName(String name)
Sets the name of this subset.
|
String |
toString()
Returns this subset's name.
|
public static RowSubset ALL
isIncluded
always true).public static RowSubset NONE
isIncluded
always false).public RowSubset(String name)
name
- subset namepublic String getName()
public void setName(String name)
name
- new namepublic RowSubset.Key getKey()
public void setKey(RowSubset.Key key)
key
- new keypublic abstract boolean isIncluded(long lrow)
lrow
- the index of the row in questiontrue
iff row lrow
is to be includedpublic String getMaskId()
In particular this value is used as a
maskId
by the
GuiDataSpec
class,
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(java.lang.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.
Copyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.