public static NdConstantInt create(Nd nd, int value) { NdConstantInt result = new NdConstantInt(nd); result.setValue(value); return result; }
@Override public Constant getConstant() { return IntConstant.fromValue(getValue()); } }
public void setValue(int value) { VALUE.put(getNd(), this.address, value); }
public static NdConstant create(Nd nd, Constant constant) { if (constant == Constant.NotAConstant) { return null; } switch (constant.typeID()) { case TypeIds.T_boolean: return NdConstantBoolean.create(nd, constant.booleanValue()); case TypeIds.T_byte: return NdConstantByte.create(nd, constant.byteValue()); case TypeIds.T_char: return NdConstantChar.create(nd, constant.charValue()); case TypeIds.T_double: return NdConstantDouble.create(nd, constant.doubleValue()); case TypeIds.T_float: return NdConstantFloat.create(nd, constant.floatValue()); case TypeIds.T_int: return NdConstantInt.create(nd, constant.intValue()); case TypeIds.T_long: return NdConstantLong.create(nd, constant.longValue()); case TypeIds.T_short: return NdConstantShort.create(nd, constant.shortValue()); case TypeIds.T_JavaLangString: return NdConstantString.create(nd, constant.stringValue()); default: throw new IllegalArgumentException("Unknown typeID() " + constant.typeID()); //$NON-NLS-1$ } }
public int getValue() { return VALUE.get(getNd(), this.address); }
public static NdConstant create(Nd nd, Constant constant) { if (constant == Constant.NotAConstant) { return null; } switch (constant.typeID()) { case TypeIds.T_boolean: return NdConstantBoolean.create(nd, constant.booleanValue()); case TypeIds.T_byte: return NdConstantByte.create(nd, constant.byteValue()); case TypeIds.T_char: return NdConstantChar.create(nd, constant.charValue()); case TypeIds.T_double: return NdConstantDouble.create(nd, constant.doubleValue()); case TypeIds.T_float: return NdConstantFloat.create(nd, constant.floatValue()); case TypeIds.T_int: return NdConstantInt.create(nd, constant.intValue()); case TypeIds.T_long: return NdConstantLong.create(nd, constant.longValue()); case TypeIds.T_short: return NdConstantShort.create(nd, constant.shortValue()); case TypeIds.T_JavaLangString: return NdConstantString.create(nd, constant.stringValue()); default: throw new IllegalArgumentException("Unknown typeID() " + constant.typeID()); //$NON-NLS-1$ } }
public static NdConstantInt create(Nd nd, int value) { NdConstantInt result = new NdConstantInt(nd); result.setValue(value); return result; }
public int getValue() { return VALUE.get(getNd(), this.address); }
@Override public Constant getConstant() { return IntConstant.fromValue(getValue()); } }
public void setValue(int value) { VALUE.put(getNd(), this.address, value); }