net.grinder.common.processidentity
Class ProcessAddress<T extends ProcessIdentity>

java.lang.Object
  extended by net.grinder.common.processidentity.ProcessAddress<T>
Type Parameters:
T - Process identity type.
All Implemented Interfaces:
Serializable, Address
Direct Known Subclasses:
AgentAddress, WorkerAddress

public abstract class ProcessAddress<T extends ProcessIdentity>
extends Object
implements Address

Base Address implementation for a process.

Author:
Philip Aston
See Also:
Serialized Form

Constructor Summary
ProcessAddress(T processIdentity)
          Constructor.
 
Method Summary
 boolean equals(Object o)
          
 T getIdentity()
          The process identity.
 int hashCode()
          
 boolean includes(Address address)
          Whether this address includes the given address.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessAddress

public ProcessAddress(T processIdentity)
Constructor.

Parameters:
processIdentity - The agent identity.
Method Detail

includes

public boolean includes(Address address)
Whether this address includes the given address.

The general includes relationship is transitive, reflexive, and asymmetric. Simple implementations of "physical addresses" should just delegate to equals().

Specified by:
includes in interface Address
Parameters:
address - The address to check.
Returns:
true if and only if we include address.

getIdentity

public T getIdentity()
The process identity.

Returns:
The process identity.

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object o)

Overrides:
equals in class Object


Copyright © 2000-2013. All Rights Reserved.