Package pt.opensoft.math

Examples of pt.opensoft.math.BigNumber


      str = str.substring(1);
    } else if (str.charAt(0) == '-') {
      str = "-" + str.substring(1).trim();
    }
    if (str.trim().equals("")) return getEmpty(length);
    BigNumber amount = new BigNumber(str.trim(), precision);
    if (amount.getValue() == 0) return getEmpty(length);
    return amount.format();
  }
View Full Code Here


*/
public class MoneyField extends ExactNumericField {

  public MoneyField(String name) {
    super(name);
    this.value = new BigNumber(0L);
  }
View Full Code Here

    this.value = new BigNumber(0L);
  }

  public MoneyField(String name, char decimalSeparator) {
    super(name);
    this.value = new BigNumber(0L, decimalSeparator);
  }
View Full Code Here

    setPrecision(precision);
  }

  public MoneyField(String name, String number, char decimalSeparator) {
    super(name);
    this.value = new BigNumber(number, decimalSeparator);
  }
View Full Code Here

    this.value = new BigNumber(number, decimalSeparator);
  }

  public MoneyField(String name, String number, int precision) {
    super(name);
    this.value = new BigNumber(number, precision);
  }
View Full Code Here

  protected static final char DECIMAL_SEPARATOR = ',';
  protected static final int DEFAULT_PRECISION = 2;

  public ExactNumericField(String name, String number, char decimalSeparator, int precision) {
    super(name);
    super.value = new BigNumber(number, decimalSeparator);
    setPrecision(precision);
  }
View Full Code Here

    return super.setValue(value);
  }
  */

  public Object setValue(long value) {
    super.value = new BigNumber(value, DECIMAL_SEPARATOR);
    return super.value;
  }
View Full Code Here

      str = str.substring(1);
    } else if (str.charAt(0) == '-') {
      str = "-" + str.substring(1).trim();
    }
    if (str.trim().equals("")) return getEmpty(length);
    BigNumber amount = new BigNumber(str.trim(), precision);
    return amount.format();
  }
View Full Code Here

      str = str.substring(1);
    } else if (str.charAt(0) == '-') {
      str = "-" + str.substring(1).trim();
    }
    if (str.trim().equals("")) return getEmpty(length);
    BigNumber amount = new BigNumber(str.trim(), 0);
    return amount.toString();
  }
View Full Code Here

TOP

Related Classes of pt.opensoft.math.BigNumber

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.