Class GStringImpl

    • Constructor Detail

      • GStringImpl

        public GStringImpl​(Object[] values,
                           String[] strings)
        Create a new GString with values and strings.

        Each value is prefixed by a string, after the last value an additional String might be used. This means strings.length == values.length || strings.length == values.length + 1.

        NOTE: The lengths are not checked. Using different lengths might result in unpredictable behaviour.

        Parameters:
        values - the value parts
        strings - the string parts
    • Method Detail

      • getStrings

        public String[] getStrings()
        Get the strings of this GString.

        This methods returns the same array as used in the constructor. Changing the values will result in changes of the GString. It is not recommended to do so.

        Specified by:
        getStrings in class GString
      • isEmpty

        public boolean isEmpty()
      • codePointAt

        public int codePointAt​(int index)
      • codePointBefore

        public int codePointBefore​(int index)
      • codePointCount

        public int codePointCount​(int beginIndex,
                                  int endIndex)
      • offsetByCodePoints

        public int offsetByCodePoints​(int index,
                                      int codePointOffset)
      • getChars

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

        public byte[] getBytes​(Charset charset)
      • contentEquals

        public boolean contentEquals​(StringBuffer sb)
      • contentEquals

        public boolean contentEquals​(CharSequence cs)
      • equalsIgnoreCase

        public boolean equalsIgnoreCase​(String anotherString)
      • compareTo

        public int compareTo​(String anotherString)
      • compareToIgnoreCase

        public int compareToIgnoreCase​(String str)
      • regionMatches

        public boolean regionMatches​(int toffset,
                                     String other,
                                     int ooffset,
                                     int len)
      • regionMatches

        public boolean regionMatches​(boolean ignoreCase,
                                     int toffset,
                                     String other,
                                     int ooffset,
                                     int len)
      • startsWith

        public boolean startsWith​(String prefix,
                                  int toffset)
      • startsWith

        public boolean startsWith​(String prefix)
      • endsWith

        public boolean endsWith​(String suffix)
      • indexOf

        public int indexOf​(int ch)
      • indexOf

        public int indexOf​(int ch,
                           int fromIndex)
      • lastIndexOf

        public int lastIndexOf​(int ch)
      • lastIndexOf

        public int lastIndexOf​(int ch,
                               int fromIndex)
      • indexOf

        public int indexOf​(String str)
      • indexOf

        public int indexOf​(String str,
                           int fromIndex)
      • lastIndexOf

        public int lastIndexOf​(String str)
      • lastIndexOf

        public int lastIndexOf​(String str,
                               int fromIndex)
      • substring

        public String substring​(int beginIndex)
      • substring

        public String substring​(int beginIndex,
                                int endIndex)
      • replace

        public String replace​(char oldChar,
                              char newChar)
      • matches

        public boolean matches​(String regex)
      • split

        public String[] split​(String regex,
                              int limit)
      • toLowerCase

        public String toLowerCase​(Locale locale)
      • toLowerCase

        public String toLowerCase()
      • toUpperCase

        public String toUpperCase​(Locale locale)
      • toUpperCase

        public String toUpperCase()
      • toCharArray

        public char[] toCharArray()
      • intern

        public String intern()