class LongCache {
    private LongCache() {}

    static final AviatorLong cache[] = new AviatorLong[256];

    static {
      for (long i = 0; i < cache.length; i++) {
        cache[(int) i] = new AviatorLong(i - 128);
      }
    }
  }

  AviatorLong(final long i) {
    super(i);
  }


  AviatorLong(final Number number) {
    super(number);

  }


  public static AviatorLong valueOf(final long l) {
    final int offset = 128;
    if (l >= -128 && l <= 127) { // will cache
      return LongCache.cache[(int) l + offset];
    }
    return new AviatorLong(l);
  }


  public static AviatorLong valueOf(final Long l) {
    return valueOf(l.longValue());
  }


  @Override
  public AviatorObject neg(final Map<String, Object> env) {
    return AviatorLong.valueOf(-this.longValue);
  }


  @Override
  public int innerCompare(final Map<String, Object> env, final AviatorNumber other) {
    if (other.getAviatorType() == AviatorType.Long) {
      return TypeUtils.comapreLong(longValue(), other.longValue());
    }

    switch (other.getAviatorType()) {
      case BigInt:
        return toBigInt().compareTo(other.toBigInt());
      case Decimal:
        return toDecimal(env).compareTo(other.toDecimal(env));
      case Double:
        return Double.compare(doubleValue(), other.doubleValue());
      default:
        throw new CompareNotSupportedException(
            "Could not compare " + desc(env) + " with " + other.desc(env));
    }
  }


  @Override
  public AviatorObject innerDiv(final Map<String, Object> env, final AviatorNumber other) {
    switch (other.getAviatorType()) {
      case BigInt:
        return AviatorBigInt.valueOf(toBigInt().divide(other.toBigInt()));
      case Decimal:
        return AviatorDecimal
            .valueOf(toDecimal(env).divide(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
      case Long:
        return AviatorLong.valueOf(this.longValue / other.longValue());
      default:
        return AviatorDouble.valueOf(this.longValue / other.doubleValue());
    }
  }


  @Override
  public AviatorObject innerAdd(final Map<String, Object> env, final AviatorNumber other) {
    switch (other.getAviatorType()) {
      case BigInt:
        return AviatorBigInt.valueOf(toBigInt().add(other.toBigInt()));
      case Decimal:
        return AviatorDecimal
            .valueOf(toDecimal(env).add(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
      case Long:
        return AviatorLong.valueOf(this.longValue + other.longValue());
      default:
        return new AviatorDouble(this.longValue + other.doubleValue());
    }
  }


  @Override
  public AviatorObject innerMod(final Map<String, Object> env, final AviatorNumber other) {<FILL_FUNCTION_BODY>

    switch (other.getAviatorType()) {
      case BigInt:
        return AviatorBigInt.valueOf(toBigInt().mod(other.toBigInt()));
      case Decimal:
        return AviatorDecimal.valueOf(
            toDecimal(env).remainder(other.toDecimal(env), RuntimeUtils.getMathContext(env)));
      case Long:
        return AviatorLong.valueOf(this.longValue % other.longValue());
      default:
        return new AviatorDouble(this.longValue % other.doubleValue());
    }
  
<methods>public void <init>(long) ,public void <init>(double) ,public void <init>(java.lang.Number) ,public com.googlecode.aviator.runtime.type.AviatorObject add(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject div(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public double doubleValue() ,public java.lang.Object getValue(Map<java.lang.String,java.lang.Object>) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerAdd(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public int innerCompare(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public abstract int innerCompare(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerDiv(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerMod(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerMult(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public abstract com.googlecode.aviator.runtime.type.AviatorObject innerSub(Map<java.lang.String,java.lang.Object>, com.googlecode.aviator.runtime.type.AviatorNumber) ,public long longValue() ,public com.googlecode.aviator.runtime.type.AviatorObject mod(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject mult(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public com.googlecode.aviator.runtime.type.AviatorObject sub(com.googlecode.aviator.runtime.type.AviatorObject, Map<java.lang.String,java.lang.Object>) ,public final java.math.BigInteger toBigInt() ,public final java.math.BigDecimal toDecimal(Map<java.lang.String,java.lang.Object>) ,public static com.googlecode.aviator.runtime.type.AviatorNumber valueOf(java.lang.Object) <variables>protected double doubleValue,protected long longValue,protected java.lang.Number number,private static final long serialVersionUID