Package com.amazonaws.services.ec2.model
Class PortRange
- java.lang.Object
-
- com.amazonaws.services.ec2.model.PortRange
-
- All Implemented Interfaces:
Serializable,Cloneable
public class PortRange extends Object implements Serializable, Cloneable
Describes a range of ports.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PortRange()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PortRangeclone()booleanequals(Object obj)IntegergetFrom()The first port in the range.IntegergetTo()The last port in the range.inthashCode()voidsetFrom(Integer from)The first port in the range.voidsetTo(Integer to)The last port in the range.StringtoString()Returns a string representation of this object; useful for testing and debugging.PortRangewithFrom(Integer from)The first port in the range.PortRangewithTo(Integer to)The last port in the range.
-
-
-
Method Detail
-
setFrom
public void setFrom(Integer from)
The first port in the range.
- Parameters:
from- The first port in the range.
-
getFrom
public Integer getFrom()
The first port in the range.
- Returns:
- The first port in the range.
-
withFrom
public PortRange withFrom(Integer from)
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
public void setTo(Integer to)
The last port in the range.
- Parameters:
to- The last port in the range.
-
getTo
public Integer getTo()
The last port in the range.
- Returns:
- The last port in the range.
-
withTo
public PortRange withTo(Integer to)
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
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-