AsciiString implements CharSequence, AsciiStringable, Comparable<CharSequence> { @Override public int compareTo(final CharSequence sequence) { if (this == sequence || this.equals(sequence)) { return 0; } return this.toString().compareTo(sequence.toString()); } private  AsciiString(final String value); private  AsciiString(final byte[] bytes); static AsciiString randomUUIDAsciiString(); static AsciiString integerToHexString(final int number); static AsciiString integerToHexStringWithoutPrefix(final int number); static AsciiString of(final String string); static AsciiString of(final Number number); static AsciiString of(final String string, final boolean cache); static AsciiString of(final byte[] string); boolean isEmpty(); byte[] getValue(); @Override int length(); @Override char charAt(final int i); @Override CharSequence subSequence(final int i, final int i1); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object object); boolean contains(final CharSequence other); boolean equals(final AsciiString other); @SuppressWarnings("ALL") boolean equalsIgnoreCase(final CharSequence other); boolean endsWith(final String string); AsciiString toLowerCase(); AsciiString toUpperCase(); @Override AsciiString toAsciiString(); int toInteger(); boolean isInteger(); long toLong(); @Override int compareTo(final CharSequence sequence); List<AsciiString> split(final String delimiter); boolean startsWith(final AsciiString part); boolean startsWith(final String part); static final AsciiString empty; }
@Test void compareTo() { final AsciiString asciiString = of("Hello World", false); assertEquals("Hello World".compareTo("Hello"), asciiString.compareTo("Hello")); }