Java 类org.projectfloodlight.openflow.protocol.OFTableModPropEvictionFlag 实例源码

项目:openflowj-otn    文件:OFTableModPropEvictionFlagSerializerVer14.java   
public static int toWireValue(Set<OFTableModPropEvictionFlag> set) {
    int wireValue = 0;

    for(OFTableModPropEvictionFlag e: set) {
        switch(e) {
            case OTHER:
                wireValue |= OTHER_VAL;
                break;
            case IMPORTANCE:
                wireValue |= IMPORTANCE_VAL;
                break;
            case LIFETIME:
                wireValue |= LIFETIME_VAL;
                break;
            default:
                throw new IllegalArgumentException("Illegal enum value for type OFTableModPropEvictionFlag in version 1.4: " + e);
        }
    }
    return wireValue;
}
项目:loxigen-artifacts    文件:OFTableModPropEvictionFlagSerializerVer15.java   
public static int toWireValue(Set<OFTableModPropEvictionFlag> set) {
    int wireValue = 0;

    for(OFTableModPropEvictionFlag e: set) {
        switch(e) {
            case OTHER:
                wireValue |= OTHER_VAL;
                break;
            case IMPORTANCE:
                wireValue |= IMPORTANCE_VAL;
                break;
            case LIFETIME:
                wireValue |= LIFETIME_VAL;
                break;
            default:
                throw new IllegalArgumentException("Illegal enum value for type OFTableModPropEvictionFlag in version 1.5: " + e);
        }
    }
    return wireValue;
}
项目:loxigen-artifacts    文件:OFTableModPropEvictionFlagSerializerVer14.java   
public static int toWireValue(Set<OFTableModPropEvictionFlag> set) {
    int wireValue = 0;

    for(OFTableModPropEvictionFlag e: set) {
        switch(e) {
            case OTHER:
                wireValue |= OTHER_VAL;
                break;
            case IMPORTANCE:
                wireValue |= IMPORTANCE_VAL;
                break;
            case LIFETIME:
                wireValue |= LIFETIME_VAL;
                break;
            default:
                throw new IllegalArgumentException("Illegal enum value for type OFTableModPropEvictionFlag in version 1.4: " + e);
        }
    }
    return wireValue;
}
项目:openflowj-otn    文件:OFTableModPropEvictionFlagSerializerVer14.java   
public static Set<OFTableModPropEvictionFlag> readFrom(ChannelBuffer bb) throws OFParseError {
    try {
        return ofWireValue(bb.readInt());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:openflowj-otn    文件:OFTableModPropEvictionFlagSerializerVer14.java   
public static Set<OFTableModPropEvictionFlag> ofWireValue(int val) {
    EnumSet<OFTableModPropEvictionFlag> set = EnumSet.noneOf(OFTableModPropEvictionFlag.class);

    if((val & OTHER_VAL) != 0)
        set.add(OFTableModPropEvictionFlag.OTHER);
    if((val & IMPORTANCE_VAL) != 0)
        set.add(OFTableModPropEvictionFlag.IMPORTANCE);
    if((val & LIFETIME_VAL) != 0)
        set.add(OFTableModPropEvictionFlag.LIFETIME);
    return Collections.unmodifiableSet(set);
}
项目:loxigen-artifacts    文件:OFTableModPropEvictionFlagSerializerVer15.java   
public static Set<OFTableModPropEvictionFlag> readFrom(ByteBuf bb) throws OFParseError {
    try {
        return ofWireValue(bb.readInt());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:loxigen-artifacts    文件:OFTableModPropEvictionFlagSerializerVer15.java   
public static Set<OFTableModPropEvictionFlag> ofWireValue(int val) {
    EnumSet<OFTableModPropEvictionFlag> set = EnumSet.noneOf(OFTableModPropEvictionFlag.class);

    if((val & OTHER_VAL) != 0)
        set.add(OFTableModPropEvictionFlag.OTHER);
    if((val & IMPORTANCE_VAL) != 0)
        set.add(OFTableModPropEvictionFlag.IMPORTANCE);
    if((val & LIFETIME_VAL) != 0)
        set.add(OFTableModPropEvictionFlag.LIFETIME);
    return Collections.unmodifiableSet(set);
}
项目:loxigen-artifacts    文件:OFTableModPropEvictionFlagSerializerVer14.java   
public static Set<OFTableModPropEvictionFlag> readFrom(ByteBuf bb) throws OFParseError {
    try {
        return ofWireValue(bb.readInt());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:loxigen-artifacts    文件:OFTableModPropEvictionFlagSerializerVer14.java   
public static Set<OFTableModPropEvictionFlag> ofWireValue(int val) {
    EnumSet<OFTableModPropEvictionFlag> set = EnumSet.noneOf(OFTableModPropEvictionFlag.class);

    if((val & OTHER_VAL) != 0)
        set.add(OFTableModPropEvictionFlag.OTHER);
    if((val & IMPORTANCE_VAL) != 0)
        set.add(OFTableModPropEvictionFlag.IMPORTANCE);
    if((val & LIFETIME_VAL) != 0)
        set.add(OFTableModPropEvictionFlag.LIFETIME);
    return Collections.unmodifiableSet(set);
}
项目:openflowj-otn    文件:OFTableModPropEvictionFlagSerializerVer14.java   
public static void writeTo(ChannelBuffer bb, Set<OFTableModPropEvictionFlag> set) {
    bb.writeInt(toWireValue(set));
}
项目:openflowj-otn    文件:OFTableModPropEvictionFlagSerializerVer14.java   
public static void putTo(Set<OFTableModPropEvictionFlag> set, PrimitiveSink sink) {
    sink.putInt(toWireValue(set));
}
项目:loxigen-artifacts    文件:OFTableModPropEvictionFlagSerializerVer15.java   
public static void writeTo(ByteBuf bb, Set<OFTableModPropEvictionFlag> set) {
    bb.writeInt(toWireValue(set));
}
项目:loxigen-artifacts    文件:OFTableModPropEvictionFlagSerializerVer15.java   
public static void putTo(Set<OFTableModPropEvictionFlag> set, PrimitiveSink sink) {
    sink.putInt(toWireValue(set));
}
项目:loxigen-artifacts    文件:OFTableModPropEvictionFlagSerializerVer14.java   
public static void writeTo(ByteBuf bb, Set<OFTableModPropEvictionFlag> set) {
    bb.writeInt(toWireValue(set));
}
项目:loxigen-artifacts    文件:OFTableModPropEvictionFlagSerializerVer14.java   
public static void putTo(Set<OFTableModPropEvictionFlag> set, PrimitiveSink sink) {
    sink.putInt(toWireValue(set));
}