本文整理汇总了Java中tech.tablesaw.api.Table.intColumn方法的典型用法代码示例。如果您正苦于以下问题:Java Table.intColumn方法的具体用法?Java Table.intColumn怎么用?Java Table.intColumn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tech.tablesaw.api.Table
的用法示例。
在下文中一共展示了Table.intColumn方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: apply
import tech.tablesaw.api.Table; //导入方法依赖的package包/类
public Selection apply(Table relation) {
String name = columnReference.getColumnName();
Column column = relation.column(name);
ColumnType type = column.type();
switch (type) {
case INTEGER:
IntColumn intColumn = relation.intColumn(name);
return intColumn.isGreaterThanOrEqualTo(value);
case LONG_INT:
LongColumn longColumn = relation.longColumn(name);
return longColumn.isGreaterThanOrEqualTo(value);
case SHORT_INT:
ShortColumn shortColumn = relation.shortColumn(name);
return shortColumn.isGreaterThanOrEqualTo(value);
default:
throw new UnsupportedOperationException("Columns of type " + type.name() + " do not support the operation "
+ "greaterThanOrEqualTo(anInt) ");
}
}
示例2: apply
import tech.tablesaw.api.Table; //导入方法依赖的package包/类
public Selection apply(Table relation) {
String name = columnReference.getColumnName();
Column column = relation.column(name);
ColumnType type = column.type();
switch (type) {
case INTEGER:
IntColumn intColumn = relation.intColumn(name);
return intColumn.isLessThanOrEqualTo(value);
case LONG_INT:
LongColumn longColumn = relation.longColumn(name);
return longColumn.isLessThanOrEqualTo(value);
case SHORT_INT:
ShortColumn shortColumn = relation.shortColumn(name);
return shortColumn.isLessThanOrEqualTo(value);
default:
throw new UnsupportedOperationException("Columns of type " + type.name() + " do not support the operation "
+ "lessThanOrEqualTo(anInt) ");
}
}
示例3: apply
import tech.tablesaw.api.Table; //导入方法依赖的package包/类
public Selection apply(Table relation) {
String name = columnReference.getColumnName();
Column column = relation.column(name);
ColumnType type = column.type();
switch (type) {
case INTEGER:
IntColumn intColumn = relation.intColumn(name);
return intColumn.isLessThan(value);
case LONG_INT:
LongColumn longColumn = relation.longColumn(name);
return longColumn.isLessThan(value);
case SHORT_INT:
ShortColumn shortColumn = relation.shortColumn(name);
return shortColumn.isLessThan(value);
default:
throw new UnsupportedOperationException("Columns of type " + type.name() + " do not support the operation "
+ "lessThan(anInt) ");
}
}
示例4: apply
import tech.tablesaw.api.Table; //导入方法依赖的package包/类
public Selection apply(Table relation) {
String name = columnReference.getColumnName();
Column column = relation.column(name);
ColumnType type = column.type();
switch (type) {
case INTEGER:
IntColumn intColumn = relation.intColumn(name);
return intColumn.isGreaterThan(value);
case LONG_INT:
LongColumn longColumn = relation.longColumn(name);
return longColumn.isGreaterThan(value);
case SHORT_INT:
ShortColumn shortColumn = relation.shortColumn(name);
return shortColumn.isGreaterThan(value);
default:
throw new UnsupportedOperationException("Columns of type " + type.name() + " do not support the operation "
+ "greaterThan(anInt) ");
}
}
示例5: testFilter1
import tech.tablesaw.api.Table; //导入方法依赖的package包/类
@Test
public void testFilter1() {
Table result = table.selectWhere(column("approval").isLessThan(70));
IntColumn a = result.intColumn("approval");
for (int v : a) {
assertTrue(v < 70);
}
}
示例6: testFilter3
import tech.tablesaw.api.Table; //导入方法依赖的package包/类
@Test
public void testFilter3() {
Table result = table.selectWhere(
both(column("date").isInApril(),
column("approval").isGreaterThan(70)));
DateColumn dates = result.dateColumn("date");
IntColumn approval = result.intColumn("approval");
for (int row : result) {
assertTrue(PackedLocalDate.isInApril(dates.getIntInternal(row)));
assertTrue(approval.get(row) > 70);
}
}