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


Java BitSet.xor方法代码示例

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


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

示例1: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"ACLineSegment\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:31,代码来源:ACLineSegment.java

示例2: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"BusbarSection\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);

    if (isNotSet.get(0)) {
        message.append("\t\"VoltageControlZone\" needs to be set\n");
    }
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:35,代码来源:BusbarSection.java

示例3: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"HydroPump\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);

    if (isNotSet.get(0)) {
        message.append("\t\"DrivenBy_SynchronousMachine\" needs to be set\n");
    }
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:35,代码来源:HydroPump.java

示例4: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"PowerTransformer\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);

    if (isNotSet.get(0)) {
        message.append("\t\"Contains_TransformerWindings\" needs to be set\n");
    }
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:35,代码来源:PowerTransformer.java

示例5: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"RatioTapChanger\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);

    if (isNotSet.get(0)) {
        message.append("\t\"TransformerWinding\" needs to be set\n");
    }
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:35,代码来源:RatioTapChanger.java

示例6: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"Curve\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);

    if (isNotSet.get(0)) {
        message.append("\t\"CurveScheduleDatas\" needs to be set\n");
    }
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:35,代码来源:Curve.java

示例7: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"HydroGeneratingUnit\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:31,代码来源:HydroGeneratingUnit.java

示例8: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"OperationalLimitSet\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);

    if (isNotSet.get(0)) {
        message.append("\t\"OperationalLimitValue\" needs to be set\n");
    }

    if (isNotSet.get(1)) {
        message.append("\t\"Terminal\" needs to be set\n");
    }
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:39,代码来源:OperationalLimitSet.java

示例9: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"SvTapStep\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);

    if (isNotSet.get(0)) {
        message.append("\t\"continuousPosition\" needs to be set\n");
    }

    if (isNotSet.get(1)) {
        message.append("\t\"TapChanger\" needs to be set\n");
    }
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:39,代码来源:SvTapStep.java

示例10: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"SvPowerFlow\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);

    if (isNotSet.get(0)) {
        message.append("\t\"Terminal\" needs to be set\n");
    }

    if (isNotSet.get(1)) {
        message.append("\t\"p\" needs to be set\n");
    }

    if (isNotSet.get(2)) {
        message.append("\t\"q\" needs to be set\n");
    }
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:43,代码来源:SvPowerFlow.java

示例11: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"TopologicalIsland\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);

    if (isNotSet.get(0)) {
        message.append("\t\"AngleRef_TopologicalNode\" needs to be set\n");
    }

    if (isNotSet.get(1)) {
        message.append("\t\"TopologicalNodes\" needs to be set\n");
    }
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:39,代码来源:TopologicalIsland.java

示例12: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"CurveData\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);

    if (isNotSet.get(0)) {
        message.append("\t\"y1value\" needs to be set\n");
    }

    if (isNotSet.get(1)) {
        message.append("\t\"xvalue\" needs to be set\n");
    }

    if (isNotSet.get(2)) {
        message.append("\t\"y2value\" needs to be set\n");
    }

    if (isNotSet.get(3)) {
        message.append("\t\"CurveSchedule\" needs to be set\n");
    }
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:47,代码来源:CurveData.java

示例13: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"VoltageLevel\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);

    if (isNotSet.get(0)) {
        message.append("\t\"BaseVoltage\" needs to be set\n");
    }

    if (isNotSet.get(1)) {
        message.append("\t\"MemberOf_Substation\" needs to be set\n");
    }
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:39,代码来源:VoltageLevel.java

示例14: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"SvVoltage\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);

    if (isNotSet.get(0)) {
        message.append("\t\"angle\" needs to be set\n");
    }

    if (isNotSet.get(1)) {
        message.append("\t\"TopologicalNode\" needs to be set\n");
    }

    if (isNotSet.get(2)) {
        message.append("\t\"v\" needs to be set\n");
    }
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:43,代码来源:SvVoltage.java

示例15: getMessageForConsistency

import java.util.BitSet; //导入方法依赖的package包/类
/**
 * Utility in charge of creating the message when the class is not
 * consistent within a specific context
 *
 * @param minBitset
 *            bitset describing which CIM attributes of this class have
 *            to be set so that it is consistent within a
 *            specific subset context
 * @return the message explaining what is not consistent
 */
private String getMessageForConsistency(final BitSet minBitset) {

    StringBuilder message = new StringBuilder(
            "Instance of \"FossilFuel\" of id \"");
    message.append(this.getId());
    message.append("\" is not consistent in this context:\n");
    /*
     * XOR and then AND
     * The result is :
     * "1" : has not been set and need to be
     * "0" : has been set or is not mandatory
     */

    BitSet isNotSet = new BitSet(minBitset.length());
    isNotSet.or(minBitset);
    // we create a copy of minBitset
    isNotSet.xor(this.currentBitset);
    isNotSet.and(minBitset);

    if (isNotSet.get(0)) {
        message.append("\t\"ThermalGeneratingUnit\" needs to be set\n");
    }

    if (isNotSet.get(1)) {
        message.append("\t\"fossilFuelType\" needs to be set\n");
    }
    return message.toString();
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:39,代码来源:FossilFuel.java


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