Class Strings.StringToAppend

  • Enclosing class:
    Strings

    public static class Strings.StringToAppend
    extends Object
    Knows how to append a given String to the given target, only if the target does not end with the given String to append.
    • Field Detail

      • toAppend

        private final String toAppend
    • Constructor Detail

      • StringToAppend

        StringToAppend​(String toAppend)
    • Method Detail

      • to

        public String to​(String s)
        Appends the String specified in the constructor to the String passed as argument.
        Parameters:
        s - the target String.
        Returns:
        a String containing the target String with the given String to append added to the end.