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


Java ArrayUtil.countTrueElements方法代码示例

本文整理汇总了Java中org.hsqldb.lib.ArrayUtil.countTrueElements方法的典型用法代码示例。如果您正苦于以下问题:Java ArrayUtil.countTrueElements方法的具体用法?Java ArrayUtil.countTrueElements怎么用?Java ArrayUtil.countTrueElements使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.hsqldb.lib.ArrayUtil的用法示例。


在下文中一共展示了ArrayUtil.countTrueElements方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: hasColumnOnly

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
boolean hasColumnOnly(int colIndex) {

        switch (constType) {

            case SchemaObject.ConstraintTypes.CHECK :
                return rangeVariable.usedColumns[colIndex] && ArrayUtil
                    .countTrueElements(rangeVariable.usedColumns) == 1;

            case SchemaObject.ConstraintTypes.PRIMARY_KEY :
            case SchemaObject.ConstraintTypes.UNIQUE :
                return core.mainCols.length == 1
                       && core.mainCols[0] == colIndex;

            case SchemaObject.ConstraintTypes.MAIN :
                return false;

            case SchemaObject.ConstraintTypes.FOREIGN_KEY :
                return core.refCols.length == 1 && core.refCols[0] == colIndex;

            default :
                throw Error.runtimeError(ErrorCode.U_S0500, "Constraint");
        }
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:24,代码来源:Constraint.java

示例2: hasColumnPlus

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
boolean hasColumnPlus(int colIndex) {

        switch (constType) {

            case SchemaObject.ConstraintTypes.CHECK :
                return rangeVariable.usedColumns[colIndex] && ArrayUtil
                    .countTrueElements(rangeVariable.usedColumns) > 1;

            case SchemaObject.ConstraintTypes.PRIMARY_KEY :
            case SchemaObject.ConstraintTypes.UNIQUE :
                return core.mainCols.length != 1
                       && ArrayUtil.find(core.mainCols, colIndex) != -1;

            case SchemaObject.ConstraintTypes.MAIN :
                return ArrayUtil.find(core.mainCols, colIndex) != -1;

            case SchemaObject.ConstraintTypes.FOREIGN_KEY :
                return core.refCols.length != 1
                       && ArrayUtil.find(core.refCols, colIndex) != -1;

            default :
                throw Error.runtimeError(ErrorCode.U_S0500, "Constraint");
        }
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:25,代码来源:Constraint.java

示例3: hasColumnOnly

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
boolean hasColumnOnly(int colIndex) {

        switch (constType) {

            case CHECK :
                return rangeVariable.usedColumns[colIndex] && ArrayUtil
                    .countTrueElements(rangeVariable.usedColumns) == 1;

            case PRIMARY_KEY :
            case UNIQUE :
                return core.mainCols.length == 1
                       && core.mainCols[0] == colIndex;

            case MAIN :
                return core.mainCols.length == 1
                       && core.mainCols[0] == colIndex
                       && core.mainTable == core.refTable;

            case FOREIGN_KEY :
                return core.refCols.length == 1 && core.refCols[0] == colIndex
                       && core.mainTable == core.refTable;

            default :
                throw Error.runtimeError(ErrorCode.U_S0500, "Constraint");
        }
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:27,代码来源:Constraint.java

示例4: hasColumnOnly

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
boolean hasColumnOnly(int colIndex) {

        switch (constType) {

            case SchemaObject.ConstraintTypes.CHECK :
                return rangeVariable.usedColumns[colIndex] && ArrayUtil
                    .countTrueElements(rangeVariable.usedColumns) == 1;

            case SchemaObject.ConstraintTypes.PRIMARY_KEY :
            case SchemaObject.ConstraintTypes.UNIQUE :
                return core.mainCols.length == 1
                       && core.mainCols[0] == colIndex;

            case SchemaObject.ConstraintTypes.MAIN :
                return core.mainCols.length == 1
                       && core.mainCols[0] == colIndex
                       && core.mainTable == core.refTable;

            case SchemaObject.ConstraintTypes.FOREIGN_KEY :
                return core.refCols.length == 1 && core.refCols[0] == colIndex
                       && core.mainTable == core.refTable;

            default :
                throw Error.runtimeError(ErrorCode.U_S0500, "Constraint");
        }
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:27,代码来源:Constraint.java

示例5: hasColumnPlus

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
boolean hasColumnPlus(int colIndex) {

        switch (constType) {

            case CHECK :
                return rangeVariable.usedColumns[colIndex] && ArrayUtil
                    .countTrueElements(rangeVariable.usedColumns) > 1;

            case PRIMARY_KEY :
            case UNIQUE :
                return core.mainCols.length != 1
                       && ArrayUtil.find(core.mainCols, colIndex) != -1;

            case MAIN :
                return ArrayUtil.find(core.mainCols, colIndex) != -1
                       && (core.mainCols.length != 1
                           || core.mainTable != core.refTable);

            case FOREIGN_KEY :
                return ArrayUtil.find(core.refCols, colIndex) != -1
                       && (core.mainCols.length != 1
                           || core.mainTable == core.refTable);

            default :
                throw Error.runtimeError(ErrorCode.U_S0500, "Constraint");
        }
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:28,代码来源:Constraint.java

示例6: hasColumnPlus

import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
boolean hasColumnPlus(int colIndex) {

        switch (constType) {

            case SchemaObject.ConstraintTypes.CHECK :
                return rangeVariable.usedColumns[colIndex] && ArrayUtil
                    .countTrueElements(rangeVariable.usedColumns) > 1;

            case SchemaObject.ConstraintTypes.PRIMARY_KEY :
            case SchemaObject.ConstraintTypes.UNIQUE :
                return core.mainCols.length != 1
                       && ArrayUtil.find(core.mainCols, colIndex) != -1;

            case SchemaObject.ConstraintTypes.MAIN :
                return ArrayUtil.find(core.mainCols, colIndex) != -1
                       && (core.mainCols.length != 1
                           || core.mainTable != core.refTable);

            case SchemaObject.ConstraintTypes.FOREIGN_KEY :
                return ArrayUtil.find(core.refCols, colIndex) != -1
                       && (core.mainCols.length != 1
                           || core.mainTable != core.refTable);

            default :
                throw Error.runtimeError(ErrorCode.U_S0500, "Constraint");
        }
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:28,代码来源:Constraint.java


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