com.amazonaws.services.ec2.model
Class PortRange

java.lang.Object
  extended by com.amazonaws.services.ec2.model.PortRange
All Implemented Interfaces:
Serializable

public class PortRange
extends Object
implements Serializable

Describes a range of ports.

See Also:
Serialized Form

Constructor Summary
PortRange()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortRange

public PortRange()
Method Detail

getFrom

public Integer getFrom()
The first port in the range.

Returns:
The first port in the range.

setFrom

public void setFrom(Integer from)
The first port in the range.

Parameters:
from - The first port in the range.

withFrom

public PortRange withFrom(Integer from)
The first port in the range.

Returns a reference to this object so that method calls can be chained together.

Parameters:
from - The first port in the range.
Returns:
A reference to this updated object so that method calls can be chained together.

getTo

public Integer getTo()
The last port in the range.

Returns:
The last port in the range.

setTo

public void setTo(Integer to)
The last port in the range.

Parameters:
to - The last port in the range.

withTo

public PortRange withTo(Integer to)
The last port in the range.

Returns a reference to this object so that method calls can be chained together.

Parameters:
to - The last port in the range.
Returns:
A reference to this updated 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:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2016. All rights reserved.