Package tech.tablesaw.api
Class QuerySupport
- java.lang.Object
-
- tech.tablesaw.api.QuerySupport
-
public class QuerySupport extends Object
Utility methods to aid in the construction of complex queries on tables
-
-
Constructor Summary
Constructors Constructor Description QuerySupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Function<Table,Selection>
all(Function<Table,Selection>... deferredSelections)
Returns a selection for all records that match all of the given functions.static Function<Table,Selection>
and(Function<Table,Selection>... deferredSelections)
Returns a selection for all records that match all of the given functionsstatic Function<Table,Selection>
any(Function<Table,Selection>... deferredSelections)
Returns a selection for all records that match any of the given functions.static DeferredBooleanColumn
bool(String columnName)
static DeferredBooleanColumn
booleanColumn(String columnName)
static Function<Table,Selection>
both(Function<Table,Selection> sel1, Function<Table,Selection> sel2)
Returns a selection for all records that match both of the given functionsstatic DeferredColumn
col(String columnName)
static DeferredColumn
column(String columnName)
static DeferredDateColumn
date(String columnName)
static DeferredDateColumn
dateColumn(String columnName)
static DeferredDateTimeColumn
dateTime(String columnName)
static DeferredDateTimeColumn
dateTimeColumn(String columnName)
static Function<Table,Selection>
either(Function<Table,Selection> sel1, Function<Table,Selection> sel2)
Returns a selection for all records that match either of the given functionsstatic DeferredInstantColumn
instantColumn(String columnName)
static Function<Table,Selection>
neither(Function<Table,Selection> sel1, Function<Table,Selection> sel2)
Returns a selection for all records that match neither of the given functions.static Function<Table,Selection>
not(Function<Table,Selection> deferredSelection)
Returns a selection for all records for which the given function isfalse
static Function<Table,Selection>
notAll(Function<Table,Selection>... deferredSelections)
Returns a selection for all records that don't match all of the given functionsstatic Function<Table,Selection>
notAny(Function<Table,Selection>... deferredSelections)
Returns a selection for all records that don't match any of the given functionsstatic Function<Table,Selection>
notBoth(Function<Table,Selection> sel1, Function<Table,Selection> sel2)
Returns a selection for all records that don't match both of the given functions.static DeferredNumberColumn
num(String columnName)
static DeferredNumberColumn
numberColumn(String columnName)
static Function<Table,Selection>
or(Function<Table,Selection>... deferredSelections)
Returns a selection for all records that match any of the given functionsstatic DeferredStringColumn
str(String columnName)
static DeferredStringColumn
stringColumn(String columnName)
static DeferredTimeColumn
time(String columnName)
static DeferredTimeColumn
timeColumn(String columnName)
-
-
-
Method Detail
-
not
public static Function<Table,Selection> not(Function<Table,Selection> deferredSelection)
Returns a selection for all records for which the given function isfalse
-
neither
public static Function<Table,Selection> neither(Function<Table,Selection> sel1, Function<Table,Selection> sel2)
Returns a selection for all records that match neither of the given functions. In other words, if either (or both) of sel1 or sel2 istrue
, the record as a whole isfalse
.
-
notBoth
public static Function<Table,Selection> notBoth(Function<Table,Selection> sel1, Function<Table,Selection> sel2)
Returns a selection for all records that don't match both of the given functions. In other words, if both sel1 and sel2 are true, the record as a whole is false, and if either (or both) of sel1 or sel2 isfalse
, the record as a whole istrue
.
-
notAny
@SafeVarargs public static Function<Table,Selection> notAny(Function<Table,Selection>... deferredSelections)
Returns a selection for all records that don't match any of the given functions
-
notAll
@SafeVarargs public static Function<Table,Selection> notAll(Function<Table,Selection>... deferredSelections)
Returns a selection for all records that don't match all of the given functions
-
and
@SafeVarargs public static Function<Table,Selection> and(Function<Table,Selection>... deferredSelections)
Returns a selection for all records that match all of the given functions
-
all
@SafeVarargs public static Function<Table,Selection> all(Function<Table,Selection>... deferredSelections)
Returns a selection for all records that match all of the given functions. A synonym for and()
-
both
public static Function<Table,Selection> both(Function<Table,Selection> sel1, Function<Table,Selection> sel2)
Returns a selection for all records that match both of the given functions
-
or
@SafeVarargs public static Function<Table,Selection> or(Function<Table,Selection>... deferredSelections)
Returns a selection for all records that match any of the given functions
-
any
@SafeVarargs public static Function<Table,Selection> any(Function<Table,Selection>... deferredSelections)
Returns a selection for all records that match any of the given functions. A synonym for or()
-
either
public static Function<Table,Selection> either(Function<Table,Selection> sel1, Function<Table,Selection> sel2)
Returns a selection for all records that match either of the given functions
-
column
public static DeferredColumn column(String columnName)
-
col
public static DeferredColumn col(String columnName)
-
booleanColumn
public static DeferredBooleanColumn booleanColumn(String columnName)
-
bool
public static DeferredBooleanColumn bool(String columnName)
-
stringColumn
public static DeferredStringColumn stringColumn(String columnName)
-
str
public static DeferredStringColumn str(String columnName)
-
numberColumn
public static DeferredNumberColumn numberColumn(String columnName)
-
num
public static DeferredNumberColumn num(String columnName)
-
dateColumn
public static DeferredDateColumn dateColumn(String columnName)
-
date
public static DeferredDateColumn date(String columnName)
-
dateTimeColumn
public static DeferredDateTimeColumn dateTimeColumn(String columnName)
-
dateTime
public static DeferredDateTimeColumn dateTime(String columnName)
-
instantColumn
public static DeferredInstantColumn instantColumn(String columnName)
-
timeColumn
public static DeferredTimeColumn timeColumn(String columnName)
-
time
public static DeferredTimeColumn time(String columnName)
-
-