@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class PortRange extends Object implements Serializable, Cloneable
Describes a range of ports.
Constructor and Description |
---|
PortRange() |
Modifier and Type | Method and Description |
---|---|
PortRange |
clone() |
boolean |
equals(Object obj) |
Integer |
getFrom()
The first port in the range.
|
Integer |
getTo()
The last port in the range.
|
int |
hashCode() |
void |
setFrom(Integer from)
The first port in the range.
|
void |
setTo(Integer to)
The last port in the range.
|
String |
toString()
Returns a string representation of this object.
|
PortRange |
withFrom(Integer from)
The first port in the range.
|
PortRange |
withTo(Integer to)
The last port in the range.
|
public void setFrom(Integer from)
The first port in the range.
from
- The first port in the range.public Integer getFrom()
The first port in the range.
public PortRange withFrom(Integer from)
The first port in the range.
from
- The first port in the range.public void setTo(Integer to)
The last port in the range.
to
- The last port in the range.public Integer getTo()
The last port in the range.
public PortRange withTo(Integer to)
The last port in the range.
to
- The last port in the range.public String toString()
toString
in class Object
Object.toString()