code: public static String portWithProtocol(String port) {
          if (isPortWithProtocol(port)) {
              return port;
          } else if (StringUtils.isNumeric(port)) {
              return port + "/tcp";
          } else {
              throw new InvalidPortDefinition(port);
          }
  
      }
docs: Prepare port definition ready for binding.<p/>
  Example (input -&gt; ouput):
  <pre>
  "80" -> "80/tcp"
  "80/tcp" -> "80/tcp"
  "80/udp" -> "80/udp"
  </pre>