Interface StringAlike<TYPE>

All Superinterfaces:
CharSequence, Comparable<CharSequence>, Serializable, StringCompatible
All Known Implementing Classes:
AbstractCompressedString, CompressedString, MappedCompressedString

public interface StringAlike<TYPE> extends StringCompatible, Serializable
This creates an interface (with more permissive argument types, and generified return types) for most public instance methods of class String. For static methods, often the String implementation should be used and its results converted to the desired type via construction. That is, for String method M, and StringAlike class SAC, follow the following pattern: new SAC(String.M(args...)) For JavaDocs, see String.
  • Method Details

    • isEmpty

      boolean isEmpty()
      Specified by:
      isEmpty in interface CharSequence
    • codePointAt

      int codePointAt(int index)
    • codePointBefore

      int codePointBefore(int index)
    • codePointCount

      int codePointCount(int beginIndex, int endIndex)
    • getChars

      void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
    • getBytes

      byte[] getBytes()
    • contentEquals

      boolean contentEquals(@NotNull @NotNull CharSequence cs)
    • equalsIgnoreCase

      boolean equalsIgnoreCase(@NotNull @NotNull CharSequence that)
    • compareToIgnoreCase

      int compareToIgnoreCase(@NotNull @NotNull CharSequence that)
    • regionMatches

      boolean regionMatches(boolean ignoreCase, int offset, CharSequence that, int thatOffset, int length)
    • startsWith

      boolean startsWith(@NotNull @NotNull CharSequence prefix, int offset)
    • startsWith

      boolean startsWith(@NotNull @NotNull CharSequence prefix)
    • endsWith

      boolean endsWith(@NotNull @NotNull CharSequence suffix)
    • indexOf

      int indexOf(int ch, int fromIndex)
    • indexOf

      int indexOf(int ch)
    • lastIndexOf

      int lastIndexOf(int ch, int fromIndex)
    • lastIndexOf

      int lastIndexOf(int ch)
    • substring

      TYPE substring(int beginIndex, int endIndex)
    • substring

      TYPE substring(int beginIndex)
    • concat

      TYPE concat(String other)
    • concat

      TYPE concat(TYPE other)
    • matches

      boolean matches(CharSequence regex)
    • trim

      TYPE trim()
    • toCharArray

      char[] toCharArray()
    • indexOf

      int indexOf(CharSequence cs, int fromIndex)
    • indexOf

      int indexOf(CharSequence cs)
    • lastIndexOf

      int lastIndexOf(CharSequence cs, int fromIndex)
    • lastIndexOf

      int lastIndexOf(CharSequence cs)
    • replace

      TYPE replace(char oldChar, char newChar)
    • contains

      boolean contains(CharSequence cs)
    • replaceFirst

      TYPE replaceFirst(CharSequence regex, CharSequence replacement)
    • replaceAll

      TYPE replaceAll(CharSequence regex, CharSequence replacement)
    • replace

      TYPE replace(CharSequence target, CharSequence replacement)
    • split

      TYPE[] split(CharSequence regex, int limit)
    • split

      TYPE[] split(CharSequence regex)
    • toLowerCase

      TYPE toLowerCase(Locale locale)
    • toLowerCase

      TYPE toLowerCase()
    • toUpperCase

      TYPE toUpperCase(Locale locale)
    • toUpperCase

      TYPE toUpperCase()
    • intern

      TYPE intern()