@Test public void testToNumeric() { assertEquals(Byte.valueOf("123"), toByte(fromString("123"))); assertEquals(Byte.valueOf("123"), toByte(fromString("+123"))); assertEquals(Byte.valueOf("-123"), toByte(fromString("-123"))); assertEquals(Short.valueOf("123"), toShort(fromString("123"))); assertEquals(Short.valueOf("123"), toShort(fromString("+123"))); assertEquals(Short.valueOf("-123"), toShort(fromString("-123"))); assertEquals(Integer.valueOf("123"), toInt(fromString("123"))); assertEquals(Integer.valueOf("123"), toInt(fromString("+123"))); assertEquals(Integer.valueOf("-123"), toInt(fromString("-123"))); assertEquals(Long.valueOf("1234567890"), toLong(fromString("1234567890"))); assertEquals(Long.valueOf("+1234567890"), toLong(fromString("+1234567890"))); assertEquals(Long.valueOf("-1234567890"), toLong(fromString("-1234567890"))); assertEquals(Integer.valueOf("123"), toInt(fromString("123.456789"))); assertEquals(Long.valueOf("123"), toLong(fromString("123.456789"))); assertNull(toInt(fromString("1a3.456789"))); assertNull(toInt(fromString("123.a56789"))); BinaryRow row = new BinaryRow(20); BinaryRowWriter writer = new BinaryRowWriter(row); writer.writeString(0, BinaryString.fromString("1")); writer.writeString(1, BinaryString.fromString("123")); writer.writeString(2, BinaryString.fromString("12345")); writer.writeString(3, BinaryString.fromString("123456789")); writer.complete(); assertEquals(Byte.valueOf("1"), toByte(row.getString(0))); assertEquals(Short.valueOf("123"), toShort(row.getString(1))); assertEquals(Integer.valueOf("12345"), toInt(row.getString(2))); assertEquals(Long.valueOf("123456789"), toLong(row.getString(3))); }
public static BinaryString fromString(String str) { if (str == null) { return null; } else { return new BinaryString(str); } }
BinaryString extends LazyBinaryFormat<String> implements Comparable<BinaryString> { public static BinaryString fromString(String str) { if (str == null) { return null; } else { return new BinaryString(str); } } }
BinaryString extends LazyBinaryFormat<String> implements Comparable<BinaryString> { public static BinaryString fromString(String str) { if (str == null) { return null; } else { return new BinaryString(str); } } BinaryString(); private  BinaryString(MemorySegment[] segments, int offset, int sizeInBytes); private  BinaryString(String javaObject); private  BinaryString(MemorySegment[] segments, int offset, int sizeInBytes, String javaObject); }
BinaryString extends LazyBinaryFormat<String> implements Comparable<BinaryString> { public static BinaryString fromString(String str) { if (str == null) { return null; } else { return new BinaryString(str); } } BinaryString(); private  BinaryString(MemorySegment[] segments, int offset, int sizeInBytes); private  BinaryString(String javaObject); private  BinaryString(MemorySegment[] segments, int offset, int sizeInBytes, String javaObject); static BinaryString fromAddress(
			MemorySegment[] segments, int offset, int numBytes); static BinaryString fromString(String str); static BinaryString fromBytes(byte[] bytes); static BinaryString fromBytes(byte[] bytes, int offset, int numBytes); static BinaryString blankString(int length); int numChars(); byte byteAt(int index); byte[] getBytes(); @Override boolean equals(Object o); @Override String toString(); @Override void materialize(); BinaryString copy(); @Override int compareTo(@Nonnull BinaryString other); BinaryString substring(int beginIndex, int endIndex); boolean contains(final BinaryString s); boolean startsWith(final BinaryString prefix); boolean endsWith(final BinaryString suffix); BinaryString trim(); int indexOf(BinaryString str, int fromIndex); BinaryString toUpperCase(); BinaryString toLowerCase(); }
BinaryString extends LazyBinaryFormat<String> implements Comparable<BinaryString> { public static BinaryString fromString(String str) { if (str == null) { return null; } else { return new BinaryString(str); } } BinaryString(); private  BinaryString(MemorySegment[] segments, int offset, int sizeInBytes); private  BinaryString(String javaObject); private  BinaryString(MemorySegment[] segments, int offset, int sizeInBytes, String javaObject); static BinaryString fromAddress(
			MemorySegment[] segments, int offset, int numBytes); static BinaryString fromString(String str); static BinaryString fromBytes(byte[] bytes); static BinaryString fromBytes(byte[] bytes, int offset, int numBytes); static BinaryString blankString(int length); int numChars(); byte byteAt(int index); byte[] getBytes(); @Override boolean equals(Object o); @Override String toString(); @Override void materialize(); BinaryString copy(); @Override int compareTo(@Nonnull BinaryString other); BinaryString substring(int beginIndex, int endIndex); boolean contains(final BinaryString s); boolean startsWith(final BinaryString prefix); boolean endsWith(final BinaryString suffix); BinaryString trim(); int indexOf(BinaryString str, int fromIndex); BinaryString toUpperCase(); BinaryString toLowerCase(); static final BinaryString EMPTY_UTF8; }