public static boolean isFullServerName(final String str) {
    if (str == null || str.isEmpty()) {
      return false;
    }
    return SERVERNAME_PATTERN.matcher(str).matches();
  }
Returns true if the String follows the pattern of {@link #toString()}, false otherwise.
hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java