Android Open Source - Dilution Value






From Project

Back to project page Dilution.

License

The source code is released under:

MIT License

If you think the Android project Dilution listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package sk.fotopriestor.dilution.core;
/*from  w  ww . ja v a 2  s.c o  m*/
import java.math.BigDecimal;

public class Value {
  
  private BigDecimal value;
  private int unitCoef;

  public Value(BigDecimal value, int unitCoef) {
    this.value = value;
    this.unitCoef = unitCoef;
  }
  
  public Value(String value, int unitCoef) {
    this.value = new BigDecimal(value, Core.mc);
    this.unitCoef = unitCoef;
  }

  public BigDecimal getValue() {
    return value;
  }

  public int getUnitCoef() {
    return unitCoef;
  }
  
  public String toString() {
    return this.value.toString();
  }

  public boolean isZero() {
    return value.compareTo(BigDecimal.ZERO) == 0;
  }
}




Java Source Code List

sk.fotopriestor.dilution.MainActivity.java
sk.fotopriestor.dilution.core.Core.java
sk.fotopriestor.dilution.core.Value.java