public DockerPortMapping withHostPort(int hostPort){
  DockerPortMapping newMapping=new DockerPortMapping();
  newMapping.protocol=protocol;
  newMapping.containerPort=containerPort;
  newMapping.hostIp=hostIp;
  newMapping.hostPort=String.valueOf(hostPort);
  return newMapping;
}

public DockerPortMapping withHostPort ( int hostPort ) { DockerPortMapping newMapping = new DockerPortMapping ( ) ; newMapping . protocol = protocol ; newMapping . containerPort = containerPort ; newMapping . hostIp = hostIp ; newMapping . hostPort = String . valueOf ( hostPort ) ; return newMapping ; }
create a copy of this mapping with the given host port
