Package com.amazonaws.services.ec2.model
Class PortRange
java.lang.Object
com.amazonaws.services.ec2.model.PortRange
- All Implemented Interfaces:
Serializable
,Cloneable
Describes a range of ports.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
getFrom()
The first port in the range.getTo()
The last port in the range.int
hashCode()
void
The first port in the range.void
The last port in the range.toString()
Returns a string representation of this object; useful for testing and debugging.The first port in the range.The last port in the range.
-
Constructor Details
-
PortRange
public PortRange()
-
-
Method Details
-
setFrom
The first port in the range.
- Parameters:
from
- The first port in the range.
-
getFrom
The first port in the range.
- Returns:
- The first port in the range.
-
withFrom
The first port in the range.
- Parameters:
from
- The first port in the range.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setTo
The last port in the range.
- Parameters:
to
- The last port in the range.
-
getTo
The last port in the range.
- Returns:
- The last port in the range.
-
withTo
The last port in the range.
- Parameters:
to
- The last port in the range.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-