Class CustomGString

java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.lang.GString
org.codehaus.groovy.runtime.GStringImpl
gg.xp.xivsupport.groovy.helpers.CustomGString
All Implemented Interfaces:
groovy.lang.Buildable, groovy.lang.GroovyObject, groovy.lang.Writable, Serializable, CharSequence, Comparable

public abstract class CustomGString extends org.codehaus.groovy.runtime.GStringImpl
GString that uses a user-specified toString implementation for objects.
See Also:
  • Field Summary

    Fields inherited from class groovy.lang.GString

    EMPTY, EMPTY_OBJECT_ARRAY, EMPTY_STRING_ARRAY
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    CustomGString(Object[] values, String[] strings)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract String
     
    of(Object[] values, String[] strings, Function<@Nullable Object,String> converter)
    Create a new custom conversion GString
     

    Methods inherited from class org.codehaus.groovy.runtime.GStringImpl

    build, calcInitialCapacity, codePointAt, codePointBefore, codePointCount, compareTo, compareToIgnoreCase, concat, contains, contentEquals, contentEquals, endsWith, equalsIgnoreCase, freeze, getBytes, getChars, getStrings, getValues, indexOf, indexOf, indexOf, indexOf, intern, isEmpty, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, matches, offsetByCodePoints, plus, regionMatches, regionMatches, replace, replace, replaceAll, replaceFirst, split, split, startsWith, startsWith, substring, substring, toCharArray, toLowerCase, toLowerCase, toString, toUpperCase, toUpperCase, trim

    Methods inherited from class groovy.lang.GString

    charAt, compareTo, equals, equals, getBytes, getBytes, getValue, getValueCount, hashCode, invokeMethod, length, negate, plus, subSequence

    Methods inherited from class groovy.lang.GroovyObjectSupport

    getMetaClass, setMetaClass

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.CharSequence

    chars, codePoints

    Methods inherited from interface groovy.lang.GroovyObject

    getProperty, setProperty
  • Constructor Details

    • CustomGString

      protected CustomGString(Object[] values, String[] strings)
  • Method Details

    • of

      public static CustomGString of(Object[] values, String[] strings, Function<@Nullable Object,String> converter)
      Create a new custom conversion GString
      Parameters:
      values - the value parts
      strings - the string parts
      converter - the custom object-to-string conversion
    • convert

      protected abstract String convert(Object obj)
    • writeTo

      public Writer writeTo(Writer out) throws IOException
      Specified by:
      writeTo in interface groovy.lang.Writable
      Overrides:
      writeTo in class org.codehaus.groovy.runtime.GStringImpl
      Throws:
      IOException