@Override public String getValue() { return value.toString(); } }
public Hex64TypeNode(BinaryReader binaryReader, ChunkHeader chunkHeader, BxmlNode parent, int length) throws IOException { super(binaryReader, chunkHeader, parent, length); value = "0x" + binaryReader.readQWord().toString(16); }
public void testToString() { for (long value : TEST_LONGS) { UnsignedLong unsignedValue = UnsignedLong.fromLongBits(value); assertEquals(unsignedValue.bigIntegerValue().toString(), unsignedValue.toString()); } }
public void testToStringRadixQuick() { int[] radices = {2, 3, 5, 7, 10, 12, 16, 21, 31, 36}; for (int radix : radices) { for (long l : TEST_LONGS) { UnsignedLong value = UnsignedLong.fromLongBits(l); assertEquals(value.bigIntegerValue().toString(radix), value.toString(radix)); } } }
@GwtIncompatible // too slow public void testToStringRadix() { for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) { for (long l : TEST_LONGS) { UnsignedLong value = UnsignedLong.fromLongBits(l); assertEquals(value.bigIntegerValue().toString(radix), value.toString(radix)); } } }
@Override public String encode(UnsignedLong value) { checkNotNull(value, "Null values are not allowed"); return value.toString(); }
/** * Returns a {@link String} instance representing the configuration parameter's {@literal value}. * * @param value The configuration parameter's {@link UnsignedLong} value * @return A {@link String} instance representing the configuration parameter's typed value */ @Override public String convertTo(UnsignedLong value) { if (value == null) { throw new ParameterException("Couldn't convert \"null\" to String."); } return value.toString(); } }
public void testToString() { for (long value : TEST_LONGS) { UnsignedLong unsignedValue = UnsignedLong.fromLongBits(value); assertEquals(unsignedValue.bigIntegerValue().toString(), unsignedValue.toString()); } }
public void testToStringRadixQuick() { int[] radices = {2, 3, 5, 7, 10, 12, 16, 21, 31, 36}; for (int radix : radices) { for (long l : TEST_LONGS) { UnsignedLong value = UnsignedLong.fromLongBits(l); assertEquals(value.bigIntegerValue().toString(radix), value.toString(radix)); } } }
@GwtIncompatible // too slow public void testToStringRadix() { for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) { for (long l : TEST_LONGS) { UnsignedLong value = UnsignedLong.fromLongBits(l); assertEquals(value.bigIntegerValue().toString(radix), value.toString(radix)); } } }