当前位置: 首页>>代码示例>>Java>>正文


Java Table.intColumn方法代码示例

本文整理汇总了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) ");
        }
    }
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:21,代码来源:IntGreaterThanOrEqualTo.java

示例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) ");
    }
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:20,代码来源:IntLessThanOrEqualTo.java

示例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) ");
    }
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:20,代码来源:IntLessThan.java

示例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) ");
    }
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:20,代码来源:IntGreaterThan.java

示例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);
    }
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:9,代码来源:TableFilteringTest.java

示例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);
    }
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:14,代码来源:TableFilteringTest.java


注:本文中的tech.tablesaw.api.Table.intColumn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。