org.entityfs.util
Class EntityAndRelativeLocation<T extends EntityView>

java.lang.Object
  extended by org.entityfs.util.EntityAndRelativeLocation<T>

public class EntityAndRelativeLocation<T extends EntityView>
extends Object

This immutable object contains an entity of some kind and its location relative to some directory.

Since:
1.1
Author:
Karl Gustafsson
See Also:
EntityFilterToEntityAndRelativeLocationFilterAdapter

Constructor Summary
EntityAndRelativeLocation(T ent, RelativeLocation loc)
          Create a new entity and relative location object.
 
Method Summary
 boolean equals(Object o)
           
 T getEntity()
          Get the entity.
 RelativeLocation getRelativeLocation()
          Get the relative location.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntityAndRelativeLocation

public EntityAndRelativeLocation(T ent,
                                 RelativeLocation loc)
                          throws NullPointerException
Create a new entity and relative location object.

Parameters:
ent - The entity.
loc - The relative location.
Throws:
NullPointerException - If any of the arguments is null.
Method Detail

getEntity

public T getEntity()
Get the entity.

Returns:
The entity. Never null.

getRelativeLocation

public RelativeLocation getRelativeLocation()
Get the relative location.

Returns:
The relative location. Never null.

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object