public static BigDecimalValue autocast(BigDecimal x, BigDecimalValue y) { if (x == null) { return null; } return new BigDecimalValue(x); }
/** * Is used to overload implicit cast operators from char to org.openl.meta.BigDecimalValue * @param x * @param y is needed to avoid ambiguity in Java method resolution * @return the casted value to org.openl.meta.BigDecimalValue */ public static org.openl.meta.BigDecimalValue autocast(char x, org.openl.meta.BigDecimalValue y) { return new org.openl.meta.BigDecimalValue(String.valueOf((int)x)); } /**
/** * Is used to overload implicit cast operators from short to org.openl.meta.BigDecimalValue * @param x * @param y is needed to avoid ambiguity in Java method resolution * @return the casted value to org.openl.meta.BigDecimalValue */ public static org.openl.meta.BigDecimalValue autocast(short x, org.openl.meta.BigDecimalValue y) { return new org.openl.meta.BigDecimalValue(String.valueOf(x)); } /**
/** * Is used to overload implicit cast operators from byte to org.openl.meta.BigDecimalValue * @param x * @param y is needed to avoid ambiguity in Java method resolution * @return the casted value to org.openl.meta.BigDecimalValue */ public static org.openl.meta.BigDecimalValue autocast(byte x, org.openl.meta.BigDecimalValue y) { return new org.openl.meta.BigDecimalValue(String.valueOf(x)); } /**
/** * Is used to overload implicit cast operators from short to org.openl.meta.BigDecimalValue * @param x * @param y is needed to avoid ambiguity in Java method resolution * @return the casted value to org.openl.meta.BigDecimalValue */ public static org.openl.meta.BigDecimalValue autocast(short x, org.openl.meta.BigDecimalValue y) { return new org.openl.meta.BigDecimalValue(String.valueOf(x)); } /**
/** * Is used to overload implicit cast operators from float to org.openl.meta.BigDecimalValue * @param x * @param y is needed to avoid ambiguity in Java method resolution * @return the casted value to org.openl.meta.BigDecimalValue */ public static org.openl.meta.BigDecimalValue autocast(float x, org.openl.meta.BigDecimalValue y) { return new org.openl.meta.BigDecimalValue(String.valueOf(x)); } /**
/** * Is used to overload implicit cast operators from byte to org.openl.meta.BigDecimalValue * @param x * @param y is needed to avoid ambiguity in Java method resolution * @return the casted value to org.openl.meta.BigDecimalValue */ public static org.openl.meta.BigDecimalValue autocast(byte x, org.openl.meta.BigDecimalValue y) { return new org.openl.meta.BigDecimalValue(String.valueOf(x)); } /**
public static BigDecimalValue round(BigDecimalValue value, int scale, int roundingMethod) { if (value == null) { return null; } return new BigDecimalValue(new BigDecimalValue(value.getValue().setScale(scale, roundingMethod)), NumberOperations.ROUND, new BigDecimalValue[] { value }); }
public static BigDecimalValue autocast(BigInteger x, BigDecimalValue y) { if (x == null) { return null; } return new BigDecimalValue(new BigDecimal(x)); }
public static BigDecimalValue autocast(String x, BigDecimalValue y) { if (x == null) { return null; } return new BigDecimalValue(new BigDecimal(x)); }
@Override public Object readObject(MessageReader reader, Context context) { BigDecimal value = (BigDecimal) super.readObject(reader, context); return (value == null) ? null : new BigDecimalValue(value); } }
public static BigDecimalValue autocast(BigIntegerValue x, BigDecimalValue y) { if (x == null) { return null; } return new BigDecimalValue(new BigDecimal(x.getValue())); }
public static BigDecimalValue autocast(ShortValue x, BigDecimalValue y) { if (x == null) { return null; } return new BigDecimalValue(String.valueOf(x.getValue()), x, true); }
public static BigDecimalValue autocast(DoubleValue x, BigDecimalValue y) { if (x == null) { return null; } return new BigDecimalValue(String.valueOf(x.getValue()), x, true); }
public static BigDecimalValue autocast(FloatValue x, BigDecimalValue y) { if (x == null) { return null; } return new BigDecimalValue(String.valueOf(x.getValue()), x, true); }
public static BigDecimalValue autocast(ByteValue x, BigDecimalValue y) { if (x == null) { return null; } return new BigDecimalValue(String.valueOf(x.getValue()), x, true); }
public static BigDecimalValue autocast(FloatValue x, BigDecimalValue y) { if (x == null) { return null; } return new BigDecimalValue(String.valueOf(x.getValue()), x, true); }
public static BigDecimalValue autocast(DoubleValue x, BigDecimalValue y) { if (x == null) { return null; } return new BigDecimalValue(String.valueOf(x.getValue()), x, true); }
public static BigDecimalValue autocast(LongValue x, BigDecimalValue y) { if (x == null) { return null; } return new BigDecimalValue(String.valueOf(x.getValue()), x, true); }
public static BigDecimalValue autocast(IntValue x, BigDecimalValue y) { if (x == null) { return null; } return new BigDecimalValue(String.valueOf(x.getValue()), x, true); }