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 DeferredBooleanColumnbool(String columnName)static DeferredBooleanColumnbooleanColumn(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 DeferredColumncol(String columnName)static DeferredColumncolumn(String columnName)static DeferredDateColumndate(String columnName)static DeferredDateColumndateColumn(String columnName)static DeferredDateTimeColumndateTime(String columnName)static DeferredDateTimeColumndateTimeColumn(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 DeferredInstantColumninstantColumn(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 isfalsestatic 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 DeferredNumberColumnnum(String columnName)static DeferredNumberColumnnumberColumn(String columnName)static Function<Table,Selection>or(Function<Table,Selection>... deferredSelections)Returns a selection for all records that match any of the given functionsstatic DeferredStringColumnstr(String columnName)static DeferredStringColumnstringColumn(String columnName)static DeferredTimeColumntime(String columnName)static DeferredTimeColumntimeColumn(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)
-
-