/** Function constructor **/ public BigIntegerValue(BigIntegerValue result, NumberOperations function, BigIntegerValue[] params) { super(function, params); this.value = result.getValue(); }
public static BigInteger cast(BigIntegerValue x, BigInteger y) { if (x == null) { return null; } return x.getValue(); }
/** Function constructor **/ public BigIntegerValue(BigIntegerValue result, NumberOperations function, BigIntegerValue[] params) { super(function, params); this.value = result.getValue(); }
@Override public BigInteger convert(BigIntegerValue param) { if (param == null) { return null; } return param.getValue(); };
public BigInteger marshal(BigIntegerValue val) throws Exception { return val.getValue(); } }
public static BigInteger cast(BigIntegerValue x, BigInteger y) { if (x == null) { return null; } return x.getValue(); }
public BigInteger marshal(BigIntegerValue val) throws Exception { return val.getValue(); } }
public static BigDecimal cast(BigIntegerValue x, BigDecimal y) { if (x == null) { return null; } return new BigDecimal(x.getValue()); }
public static BigDecimal cast(BigIntegerValue x, BigDecimal y) { if (x == null) { return null; } return new BigDecimal(x.getValue()); }
public static BigDecimalValue autocast(BigIntegerValue x, BigDecimalValue y) { if (x == null) { return null; } return new BigDecimalValue(new BigDecimal(x.getValue())); }
public static BigDecimalValue autocast(BigIntegerValue x, BigDecimalValue y) { if (x == null) { return null; } return new BigDecimalValue(new BigDecimal(x.getValue())); }
/** * Divides left hand operand by right hand operand and returns remainder * * @param value1 org.openl.meta.BigIntegerValue * @param value2 org.openl.meta.BigIntegerValue * @return remainder from division value1 by value2 */ public static org.openl.meta.BigIntegerValue rem(org.openl.meta.BigIntegerValue value1, org.openl.meta.BigIntegerValue value2) { // Commented to support operations with nulls. See also MathUtils.mod() // validate(value1, value2, Formulas.REM.toString()); if (value1 == null || value2 == null) { return ZERO; } return new org.openl.meta.BigIntegerValue(value1, value2, Operators.rem(value1.getValue(), value2.getValue()), Formulas.REM); }
/** * Divides left hand operand by right hand operand * * @param number org.openl.meta.BigIntegerValue * @param divisor org.openl.meta.BigIntegerValue * @return LongValue the result of division operation */ public static LongValue quotient(org.openl.meta.BigIntegerValue number, org.openl.meta.BigIntegerValue divisor) { if (number != null && divisor != null) { LongValue result = new LongValue(MathUtils.quotient(number.getValue(), divisor.getValue())); return new LongValue(result, NumberOperations.QUOTIENT, null); } return null; }
/** * Divides left hand operand by right hand operand * * @param number org.openl.meta.BigIntegerValue * @param divisor org.openl.meta.BigIntegerValue * @return LongValue the result of division operation */ public static LongValue quotient(org.openl.meta.BigIntegerValue number, org.openl.meta.BigIntegerValue divisor) { if (number != null && divisor != null) { LongValue result = new LongValue(MathUtils.quotient(number.getValue(), divisor.getValue())); return new LongValue(result, NumberOperations.QUOTIENT, null); } return null; }
/** * * @param number * @param divisor * @return the remainder after a number is divided by a divisor. The result * is a numeric value and has the same sign as the devisor. */ public static org.openl.meta.BigIntegerValue mod(org.openl.meta.BigIntegerValue number, org.openl.meta.BigIntegerValue divisor) { if (number != null && divisor != null) { org.openl.meta.BigIntegerValue result = new org.openl.meta.BigIntegerValue( MathUtils.mod(number.getValue(), divisor.getValue())); return new org.openl.meta.BigIntegerValue(result, NumberOperations.MOD, new org.openl.meta.BigIntegerValue[] { number, divisor }); } return null; }
/** * * @param number * @param divisor * @return the remainder after a number is divided by a divisor. The result * is a numeric value and has the same sign as the devisor. */ public static org.openl.meta.BigIntegerValue mod(org.openl.meta.BigIntegerValue number, org.openl.meta.BigIntegerValue divisor) { if (number != null && divisor != null) { org.openl.meta.BigIntegerValue result = new org.openl.meta.BigIntegerValue( MathUtils.mod(number.getValue(), divisor.getValue())); return new org.openl.meta.BigIntegerValue(result, NumberOperations.MOD, new org.openl.meta.BigIntegerValue[] { number, divisor }); } return null; }
public static BigIntegerValue add(String value1, BigIntegerValue value2) { if (value1 == null) { return value2; } if (value2 == null) { return new BigIntegerValue(new BigInteger(value1)); } BigInteger v = new BigInteger(value1); return new org.openl.meta.BigIntegerValue(new BigIntegerValue(v), value2, Operators.add(v, value2.getValue()), Formulas.ADD); }
public static BigIntegerValue add(BigIntegerValue value1, String value2) { if (value2 == null) { return value1; } if (value1 == null) { return new BigIntegerValue(new BigInteger(value2)); } BigInteger v = new BigInteger(value2); return new org.openl.meta.BigIntegerValue(value1, new BigIntegerValue(v), Operators.add(value1.getValue(), v), Formulas.ADD); }
/** * * @param value * @return the absolute value (module) of the value <b>value </b> */ public static org.openl.meta.BigIntegerValue abs(org.openl.meta.BigIntegerValue value) { // Commented to support operations with nulls. // validate(value, NumberOperations.ABS); if (value == null) { return null; } // evaluate result org.openl.meta.BigIntegerValue result = new org.openl.meta.BigIntegerValue(Operators.abs(value.getValue())); // create instance with information about last operation return new org.openl.meta.BigIntegerValue(result, NumberOperations.ABS, new org.openl.meta.BigIntegerValue[] { value }); }
/** * * @param value * @return the absolute value (module) of the value <b>value </b> */ public static org.openl.meta.BigIntegerValue abs(org.openl.meta.BigIntegerValue value) { // Commented to support operations with nulls. // validate(value, NumberOperations.ABS); if (value == null) { return null; } // evaluate result org.openl.meta.BigIntegerValue result = new org.openl.meta.BigIntegerValue(Operators.abs(value.getValue())); // create instance with information about last operation return new org.openl.meta.BigIntegerValue(result, NumberOperations.ABS, new org.openl.meta.BigIntegerValue[] { value }); }