MutableShort.java 3.4 KB
package org.apache.commons.lang3.mutable;

import org.apache.commons.lang3.math.NumberUtils;

public class MutableShort
  extends Number
  implements Comparable<MutableShort>, Mutable<Number>
{
  private static final long serialVersionUID = -2135791679L;
  private short a;
  
  public MutableShort() {}
  
  public MutableShort(Number paramNumber)
  {
    this.a = paramNumber.shortValue();
  }
  
  public MutableShort(String paramString)
    throws NumberFormatException
  {
    this.a = Short.parseShort(paramString);
  }
  
  public MutableShort(short paramShort)
  {
    this.a = paramShort;
  }
  
  public void add(Number paramNumber)
  {
    this.a = ((short)(this.a + paramNumber.shortValue()));
  }
  
  public void add(short paramShort)
  {
    this.a = ((short)(this.a + paramShort));
  }
  
  public short addAndGet(Number paramNumber)
  {
    this.a = ((short)(this.a + paramNumber.shortValue()));
    return this.a;
  }
  
  public short addAndGet(short paramShort)
  {
    this.a = ((short)(this.a + paramShort));
    return this.a;
  }
  
  public int compareTo(MutableShort paramMutableShort)
  {
    return NumberUtils.compare(this.a, paramMutableShort.a);
  }
  
  public void decrement()
  {
    this.a = ((short)(this.a - 1));
  }
  
  public short decrementAndGet()
  {
    this.a = ((short)(this.a - 1));
    return this.a;
  }
  
  public double doubleValue()
  {
    return this.a;
  }
  
  public boolean equals(Object paramObject)
  {
    boolean bool2 = false;
    boolean bool1 = bool2;
    if ((paramObject instanceof MutableShort))
    {
      bool1 = bool2;
      if (this.a == ((MutableShort)paramObject).shortValue()) {
        bool1 = true;
      }
    }
    return bool1;
  }
  
  public float floatValue()
  {
    return this.a;
  }
  
  public short getAndAdd(Number paramNumber)
  {
    short s = this.a;
    this.a = ((short)(this.a + paramNumber.shortValue()));
    return s;
  }
  
  public short getAndAdd(short paramShort)
  {
    short s = this.a;
    this.a = ((short)(this.a + paramShort));
    return s;
  }
  
  public short getAndDecrement()
  {
    short s = this.a;
    this.a = ((short)(this.a - 1));
    return s;
  }
  
  public short getAndIncrement()
  {
    short s = this.a;
    this.a = ((short)(this.a + 1));
    return s;
  }
  
  public Short getValue()
  {
    return Short.valueOf(this.a);
  }
  
  public int hashCode()
  {
    return this.a;
  }
  
  public void increment()
  {
    this.a = ((short)(this.a + 1));
  }
  
  public short incrementAndGet()
  {
    this.a = ((short)(this.a + 1));
    return this.a;
  }
  
  public int intValue()
  {
    return this.a;
  }
  
  public long longValue()
  {
    return this.a;
  }
  
  public void setValue(Number paramNumber)
  {
    this.a = paramNumber.shortValue();
  }
  
  public void setValue(short paramShort)
  {
    this.a = paramShort;
  }
  
  public short shortValue()
  {
    return this.a;
  }
  
  public void subtract(Number paramNumber)
  {
    this.a = ((short)(this.a - paramNumber.shortValue()));
  }
  
  public void subtract(short paramShort)
  {
    this.a = ((short)(this.a - paramShort));
  }
  
  public Short toShort()
  {
    return Short.valueOf(shortValue());
  }
  
  public String toString()
  {
    return String.valueOf(this.a);
  }
}


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