ErlangInteger extends ErlangTerm { public static ErlangInteger cached (byte value) { return ErlangIntegerCache.CACHE[value + (-ErlangIntegerCache.LOW)]; } ErlangInteger(TermType type, @NonNull ByteBuf buffer);  ErlangInteger(char value);  ErlangInteger(byte value);  ErlangInteger(short value);  ErlangInteger(int value);  ErlangInteger(long value);  ErlangInteger(@NonNull BigInteger value); static ErlangInteger cached(byte value); static ErlangInteger cached(char value); static ErlangInteger cached(short value); static ErlangInteger cached(int value); static ErlangInteger cached(long value); static ErlangInteger cached(BigInteger value); @Override boolean isByte(); @Override boolean isShort(); @Override boolean isInt(); @Override boolean isLong(); @Override boolean isBigInteger(); @Override Number asNumber(); @Override byte[] asBinary(byte[] defaultValue); @Override boolean asBoolean(boolean defaultValue); @Override String asText(String defaultValue); @Override byte asByte(byte defaultValue); @Override short asShort(short defaultValue); @Override int asInt(int defaultValue); @Override long asLong(long defaultValue); @Override BigInteger asBigInteger(BigInteger defaultValue); @Override float asFloat(float defaultValue); @Override double asDouble(double defaultValue); @Override BigDecimal asDecimal(BigDecimal defaultValue);  }
@Test public void cached () { ErlangInteger num1 = ErlangInteger.cached(1273); ErlangInteger num2 = ErlangInteger.cached(117); assertThat(num1).isNotEqualTo(num2); }