public class SyntheticRowSubset extends RowSubset
RowSubset
which uses an algebraic expression based on the
values of other columns in the same row to decide whether a row
is included or not.
The engine used for expression evaluation is the GNU Java Expressions Library (JEL).
RowSubset.Key
Constructor and Description |
---|
SyntheticRowSubset(String name,
TopcatModel tcModel,
String expression)
Constructs a new synthetic subset given a table and an algebraic
expression.
|
Modifier and Type | Method and Description |
---|---|
String |
getExpression()
Returns the text of the expression used by this subset.
|
boolean |
isIncluded(long lrow)
Indicates whether a given row is in the subset or not.
|
void |
setExpression(String expression)
Sets the expression to use for this subset.
|
public SyntheticRowSubset(String name, TopcatModel tcModel, String expression) throws gnu.jel.CompilationException
name
- the name to use for the new RowSubsettcModel
- context for JEL expression evaluationexpression
- the algebraic expressiongnu.jel.CompilationException
public void setExpression(String expression) throws gnu.jel.CompilationException
expression
- JEL expressiongnu.jel.CompilationException
public String getExpression()
public boolean isIncluded(long lrow)
RowSubset
isIncluded
in class RowSubset
lrow
- the index of the row in questiontrue
iff row lrow
is to be includedCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.