Class Strings.StringToAppend

  • Enclosing class:
    Strings

    public static class Strings.StringToAppend
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String toAppend  
    • Constructor Summary

      Constructors 
      Constructor Description
      StringToAppend​(java.lang.String toAppend)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String to​(java.lang.String s)
      Appends the String specified in the constructor to the String passed as argument.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • toAppend

        private final java.lang.String toAppend
    • Constructor Detail

      • StringToAppend

        StringToAppend​(java.lang.String toAppend)
    • Method Detail

      • to

        public java.lang.String to​(java.lang.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.