Interface VarString.Appendable

  • Enclosing class:
    VarString

    public static interface VarString.Appendable
    Implementors of this interface handle appending their specific string representation directly.
    This is useful for preventing the instantiation and copying of potentially large temporary strings which can have unnecessary and devastatingly negative effects on performance.
    Note that Appendable has a misleading name: it should properly be called "Appending", as implementors of it can append things. Actually being "appendable" is what is defined by THIS interface. One of countless design errors in the JDK.
    • Method Summary

      Modifier and Type Method Description
      VarString appendTo​(VarString vs)
      Append a string of characters to the passed VarString instance in whatever form deemed appropriate by the implementor.
    • Method Detail

      • appendTo

        VarString appendTo​(VarString vs)
        Append a string of characters to the passed VarString instance in whatever form deemed appropriate by the implementor.
        Parameters:
        vs - the VarString instance to append to.
        Returns:
        the same VarString instance that has been passed to allow method chaining.