@Override public int intValue() { return shortValue(); }
public short getExponent() { return exponent.get(); }
@Test public void testRandom() { Random random = new Random(); byte[] b = new byte[Short.BYTES]; SHORT actual = new SHORT((short) 0); for (int i = 0; i <= 100; i++) { short expected = (short) random.nextInt(); actual.set(expected); assertEquals(expected, actual.shortValue()); } }
@Override public void set(Short value) { set(value.shortValue()); }
@Test public void testMinValue() { short expected = Short.MIN_VALUE; short actual = new SHORT(expected).shortValue(); assertEquals(expected, actual); }
@Override public short shortValue() { return Bits.getShort(getBytes()); }
public void set(short value) { put(Bits.toByteArray(value)); }
protected void set(CurrencyExp3 copy) { currencyID.set(copy.getCurrencyID()); exponent.set(copy.getExponent()); }
@Test public void testMaxValue() { short expected = Short.MAX_VALUE; short actual = new SHORT(expected).shortValue(); assertEquals(expected, actual); }
protected void set(CurrencyExp3 copy) { currencyID.set(copy.getCurrencyID()); exponent.set(copy.getExponent()); }
@Override public byte byteValue() { return (byte) shortValue(); }
public short getExponent() { return exponent.get(); }
@Override public long longValue() { return shortValue(); }
@Override public Short get() { return Short.valueOf(shortValue()); } }