public class ExposedPortsParser
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static com.google.common.collect.ImmutableList<Port> |
parse(java.util.List<java.lang.String> ports)
Converts/validates a list of strings representing port ranges to an expanded list of
Ports. |
public static com.google.common.collect.ImmutableList<Port> parse(java.util.List<java.lang.String> ports) throws java.lang.NumberFormatException
Ports.
For example: ["1000", "2000-2002"] will expand to a list of Ports with the port
numbers [1000, 2000, 2001, 2002]
ports - the list of port numbers/rangesPortjava.lang.NumberFormatException - if any of the ports are in an invalid format or out of range