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:
  • Constructor Details

    • PortRange

      public PortRange()
  • Method Details

    • 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:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public PortRange clone()
      Overrides:
      clone in class Object