JXTA

net.jxta.impl.rendezvous.rpv
Class PeerViewDestination

java.lang.Object
  extended by net.jxta.impl.rendezvous.rpv.PeerViewDestination
All Implemented Interfaces:
Comparable<PeerViewDestination>
Direct Known Subclasses:
PeerViewElement

 class PeerViewDestination
extends Object
implements Comparable<PeerViewDestination>

This class contains only the comparable portion of PeerViewElement, so that it is possible to search for elements in the sorted set that the local PeerView is, without having enough information to create a valid PeerViewElement.


Constructor Summary
PeerViewDestination(ID destination)
          Constructs a PeerViewDestination from a (peer)ID.
 
Method Summary
 int compareTo(PeerViewDestination pve)
          

Note that this compares the unique value of the id.

 boolean equals(Object other)
          
 EndpointAddress getDestAddress()
          returns the destination address.
 ID getPeerID()
          Get the peer id of the peer associated with this connection.
 int hashCode()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeerViewDestination

PeerViewDestination(ID destination)
Constructs a PeerViewDestination from a (peer)ID.

Method Detail

equals

public boolean equals(Object other)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

compareTo

public int compareTo(PeerViewDestination pve)

Note that this compares the unique value of the id.

Specified by:
compareTo in interface Comparable<PeerViewDestination>

getPeerID

public ID getPeerID()
Get the peer id of the peer associated with this connection.

Returns:
The peer id of the connected peer.

getDestAddress

public EndpointAddress getDestAddress()
returns the destination address.

Returns:
The endpoint address of the connected peer.

JXSE