Project JXTA

net.jxta.impl.rendezvous.rpv
Class PeerViewDestination

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

public class PeerViewDestination
extends Object
implements Comparable

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(EndpointAddress addr)
          Constructs a PeerViewDestination from the given endpoint address.
PeerViewDestination(ID peerId)
          Constructs a PeerViewDestination from a (peer)ID.
 
Method Summary
 int compareTo(Object other)
           Note that only the protocol address and at a lower order the protocol name are considered for comparision.
 boolean equals(Object other)
          
 EndpointAddress getDestAddress()
          returns the destination address.
 int hashCode()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeerViewDestination

public PeerViewDestination(EndpointAddress addr)
Constructs a PeerViewDestination from the given endpoint address.


PeerViewDestination

public PeerViewDestination(ID peerId)
Constructs a PeerViewDestination from a (peer)ID.

Method Detail

getDestAddress

public EndpointAddress getDestAddress()
returns the destination address.


compareTo

public int compareTo(Object other)
Note that only the protocol address and at a lower order the protocol name are considered for comparision.

Specified by:
compareTo in interface Comparable

equals

public boolean equals(Object other)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

JXTA J2SE