lg.java 2.24 KB
public final class lg
  extends Number
  implements Comparable<lg>
{
  public boolean a;
  private double b;
  private long c;
  
  private lg(double paramDouble)
  {
    this.b = paramDouble;
    this.a = false;
  }
  
  private lg(long paramLong)
  {
    this.c = paramLong;
    this.a = true;
  }
  
  public static lg a(long paramLong)
  {
    return new lg(paramLong);
  }
  
  public static lg a(Double paramDouble)
  {
    return new lg(paramDouble.doubleValue());
  }
  
  public static lg a(String paramString)
    throws NumberFormatException
  {
    try
    {
      lg locallg1 = new lg(Long.parseLong(paramString));
      return locallg1;
    }
    catch (NumberFormatException localNumberFormatException1)
    {
      try
      {
        lg locallg2 = new lg(Double.parseDouble(paramString));
        return locallg2;
      }
      catch (NumberFormatException localNumberFormatException2)
      {
        throw new NumberFormatException(String.valueOf(paramString).concat(" is not a valid TypedNumber"));
      }
    }
  }
  
  public final int a(lg paramlg)
  {
    if ((this.a) && (paramlg.a)) {
      return new Long(this.c).compareTo(Long.valueOf(paramlg.c));
    }
    return Double.compare(doubleValue(), paramlg.doubleValue());
  }
  
  public final byte byteValue()
  {
    return (byte)(int)longValue();
  }
  
  public final double doubleValue()
  {
    if (this.a) {
      return this.c;
    }
    return this.b;
  }
  
  public final boolean equals(Object paramObject)
  {
    return ((paramObject instanceof lg)) && (a((lg)paramObject) == 0);
  }
  
  public final float floatValue()
  {
    return (float)doubleValue();
  }
  
  public final int hashCode()
  {
    return new Long(longValue()).hashCode();
  }
  
  public final int intValue()
  {
    return (int)longValue();
  }
  
  public final long longValue()
  {
    if (this.a) {
      return this.c;
    }
    return this.b;
  }
  
  public final short shortValue()
  {
    return (short)(int)longValue();
  }
  
  public final String toString()
  {
    if (this.a) {
      return Long.toString(this.c);
    }
    return Double.toString(this.b);
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/lg.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */