com.amazonaws.services.ec2.model
Class PortRange

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

public class PortRange
extends java.lang.Object
implements java.io.Serializable

Describes a range of ports.

See Also:
Serialized Form

Constructor Summary
PortRange()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Integer getFrom()
          The first port in the range.
 java.lang.Integer getTo()
          The last port in the range.
 int hashCode()
           
 void setFrom(java.lang.Integer from)
          The first port in the range.
 void setTo(java.lang.Integer to)
          The last port in the range.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 PortRange withFrom(java.lang.Integer from)
          The first port in the range.
 PortRange withTo(java.lang.Integer to)
          The last port in the range.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortRange

public PortRange()
Method Detail

getFrom

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

Returns:
The first port in the range.

setFrom

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

Parameters:
from - The first port in the range.

withFrom

public PortRange withFrom(java.lang.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 java.lang.Integer getTo()
The last port in the range.

Returns:
The last port in the range.

setTo

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

Parameters:
to - The last port in the range.

withTo

public PortRange withTo(java.lang.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 java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.