Address (RabbIT/4)
Date: 2009-10-13

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rabbit.io
Class Address

    java.lang.Object
      rabbit.io.Address

    public class Address

extends Object

A class to handle the addresses of the connections. Basically just a pair of InetAddress and port number.

Author:
  Robert Olofsson

Constructor Summary
`Address(InetAddress ia, int port)` Create a new Address with given InetAddress and port

Method Summary
`boolean` | `equals(Object o)` Compare this objcet agains another object.
`InetAddress` | `getInetAddress()` Get the internet address
`int` | `getPort()` Get the port number
`int` | `hashCode()` Get the hash code for this object.
`String` | `toString()` Get a String representation of this Address

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Address

    public Address(InetAddress ia,
                   int port)

  Create a new Address with given InetAddress and port

  Parameters:
    `ia` - the InetAddress this Address is connected to.
    `port` - the port number this Address is connected to.

Method Detail

### hashCode

    public int hashCode()

  Get the hash code for this object.

  Overrides:
    `hashCode` in class `Object`
  Returns:
    the hash code.

### equals

    public boolean equals(Object o)

  Compare this objcet agains another object.

  Overrides:
    `equals` in class `Object`
  Parameters:
    `o` - the Object to compare against.
  Returns:
    true if the other Object is an Address connected to the same InetAddress and port, false otherwise.

### toString

    public String toString()

  Get a String representation of this Address

  Overrides:
    `toString` in class `Object`

### getInetAddress

    public InetAddress getInetAddress()

  Get the internet address

### getPort

    public int getPort()

  Get the port number

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD