tds/src/main/java/thredds/util/StringValidateEncodeUtils.java
public static boolean containsAmpersandCharacters(String string) {
    if (string == null)
      return false;
    if (string.indexOf("&") == -1)
      return false;

    return true;
  }
public static boolean containsAmpersandCharacters(String string) {
    if (string == null)
      return false;
    if (string.indexOf("&") == -1)
      return false;

    return true;
  }
public static boolean containsAmpersandCharacters ( String string ) { if ( string == null ) return false ; if ( string . indexOf ( "&" ) == - 1 ) return false ; return true ; }
Return true if the given String contains any ampersand ("&")
characters; otherwise return false.

@param string the String to check.
@return true if the given String contains any ampersand ("&") characters
Return true if the given String contains any ampersand ( & ) characters ; otherwise return false .