org.entityfs.util
Class FoundEntity

java.lang.Object
  extended by org.entityfs.util.FoundEntity

public class FoundEntity
extends Object

This objects represents one found entity. A collection of found entities is returned from the Directories.find(org.entityfs.EntityListable, org.entityfs.support.filter.Filter) method.

This object is immutable.

Since:
1.0
Author:
Karl Gustafsson

Method Summary
 boolean equals(Object o)
          This object is equal to another FoundEntity if the entity is the same.
 EntityView getEntity()
          Get the entity that was found.
 RelativeLocation getLocation()
          Get the found entity's location relative to the directory that was the root of the find operation.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getEntity

public EntityView getEntity()
Get the entity that was found.

Returns:
The found entity.

getLocation

public RelativeLocation getLocation()
Get the found entity's location relative to the directory that was the root of the find operation.

Returns:
The entity's location relative to the directory that find was called on.

equals

public boolean equals(Object o)
This object is equal to another FoundEntity if the entity is the same. The location is ignored.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object