Did this page help you?

   Yes   No   Tell us about it...

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

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
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortRange

public PortRange()
Method Detail

getFrom

public Integer getFrom()
The first port in the range. Required if specifying tcp or udp for the protocol.

Returns:
The first port in the range. Required if specifying tcp or udp for the protocol.

setFrom

public void setFrom(Integer from)
The first port in the range. Required if specifying tcp or udp for the protocol.

Parameters:
from - The first port in the range. Required if specifying tcp or udp for the protocol.

withFrom

public PortRange withFrom(Integer from)
The first port in the range. Required if specifying tcp or udp for the protocol.

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

Parameters:
from - The first port in the range. Required if specifying tcp or udp for the protocol.
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. Required if specifying tcp or udp for the protocol.

Returns:
The last port in the range. Required if specifying tcp or udp for the protocol.

setTo

public void setTo(Integer to)
The last port in the range. Required if specifying tcp or udp for the protocol.

Parameters:
to - The last port in the range. Required if specifying tcp or udp for the protocol.

withTo

public PortRange withTo(Integer to)
The last port in the range. Required if specifying tcp or udp for the protocol.

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

Parameters:
to - The last port in the range. Required if specifying tcp or udp for the protocol.
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 © 2010 Amazon Web Services, Inc. All Rights Reserved.