MutableFloat.java 3.11 KB
package org.apache.commons.lang3.mutable;

public class MutableFloat
  extends Number
  implements Comparable<MutableFloat>, Mutable<Number>
{
  private static final long serialVersionUID = 5787169186L;
  private float a;
  
  public MutableFloat() {}
  
  public MutableFloat(float paramFloat)
  {
    this.a = paramFloat;
  }
  
  public MutableFloat(Number paramNumber)
  {
    this.a = paramNumber.floatValue();
  }
  
  public MutableFloat(String paramString)
    throws NumberFormatException
  {
    this.a = Float.parseFloat(paramString);
  }
  
  public void add(float paramFloat)
  {
    this.a += paramFloat;
  }
  
  public void add(Number paramNumber)
  {
    this.a += paramNumber.floatValue();
  }
  
  public float addAndGet(float paramFloat)
  {
    this.a += paramFloat;
    return this.a;
  }
  
  public float addAndGet(Number paramNumber)
  {
    this.a += paramNumber.floatValue();
    return this.a;
  }
  
  public int compareTo(MutableFloat paramMutableFloat)
  {
    return Float.compare(this.a, paramMutableFloat.a);
  }
  
  public void decrement()
  {
    this.a -= 1.0F;
  }
  
  public float decrementAndGet()
  {
    this.a -= 1.0F;
    return this.a;
  }
  
  public double doubleValue()
  {
    return this.a;
  }
  
  public boolean equals(Object paramObject)
  {
    return ((paramObject instanceof MutableFloat)) && (Float.floatToIntBits(((MutableFloat)paramObject).a) == Float.floatToIntBits(this.a));
  }
  
  public float floatValue()
  {
    return this.a;
  }
  
  public float getAndAdd(float paramFloat)
  {
    float f = this.a;
    this.a += paramFloat;
    return f;
  }
  
  public float getAndAdd(Number paramNumber)
  {
    float f = this.a;
    this.a += paramNumber.floatValue();
    return f;
  }
  
  public float getAndDecrement()
  {
    float f = this.a;
    this.a -= 1.0F;
    return f;
  }
  
  public float getAndIncrement()
  {
    float f = this.a;
    this.a += 1.0F;
    return f;
  }
  
  public Float getValue()
  {
    return Float.valueOf(this.a);
  }
  
  public int hashCode()
  {
    return Float.floatToIntBits(this.a);
  }
  
  public void increment()
  {
    this.a += 1.0F;
  }
  
  public float incrementAndGet()
  {
    this.a += 1.0F;
    return this.a;
  }
  
  public int intValue()
  {
    return (int)this.a;
  }
  
  public boolean isInfinite()
  {
    return Float.isInfinite(this.a);
  }
  
  public boolean isNaN()
  {
    return Float.isNaN(this.a);
  }
  
  public long longValue()
  {
    return this.a;
  }
  
  public void setValue(float paramFloat)
  {
    this.a = paramFloat;
  }
  
  public void setValue(Number paramNumber)
  {
    this.a = paramNumber.floatValue();
  }
  
  public void subtract(float paramFloat)
  {
    this.a -= paramFloat;
  }
  
  public void subtract(Number paramNumber)
  {
    this.a -= paramNumber.floatValue();
  }
  
  public Float toFloat()
  {
    return Float.valueOf(floatValue());
  }
  
  public String toString()
  {
    return String.valueOf(this.a);
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/org/apache/commons/lang3/mutable/MutableFloat.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */