public class PortRange extends Object implements Serializable
Constructor and Description |
---|
PortRange() |
Modifier and Type | Method and Description |
---|---|
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; useful for testing and
debugging.
|
PortRange |
withFrom(Integer from)
The first port in the range.
|
PortRange |
withTo(Integer to)
The last port in the range.
|
public Integer getFrom()
tcp
or udp
for the protocol.tcp
or udp
for the protocol.public void setFrom(Integer from)
tcp
or udp
for the protocol.from
- The first port in the range. Required if specifying tcp
or udp
for the protocol.public PortRange withFrom(Integer from)
tcp
or udp
for the protocol.
Returns a reference to this object so that method calls can be chained together.
from
- The first port in the range. Required if specifying tcp
or udp
for the protocol.public Integer getTo()
tcp
or
udp
for the protocol.tcp
or
udp
for the protocol.public void setTo(Integer to)
tcp
or
udp
for the protocol.to
- The last port in the range. Required if specifying tcp
or
udp
for the protocol.public PortRange withTo(Integer to)
tcp
or
udp
for the protocol.
Returns a reference to this object so that method calls can be chained together.
to
- The last port in the range. Required if specifying tcp
or
udp
for the protocol.public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.