|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.entityfs.el.AbstractLocation<RelativeLocation>
org.entityfs.el.RelativeLocation
public class RelativeLocation
Objects of this class describe one entity's location relative to a directory, i.e. a relative path.
Instances of this class are immutable.
For more information about entity locations, see EntityLocation.
EntityLocation,
Serialized Form| Field Summary | |
|---|---|
static RelativeLocation |
CURRENT_DIRECTORY
This is a constant representing the current directory. |
static RelativeLocation |
PARENT_DIRECTORY
This is a constant representing the parent directory. |
| Fields inherited from interface org.entityfs.el.EntityLocation |
|---|
CURRENT_DIRECTORY_STRING, EXTENSION_SEPARATOR, PARENT_DIRECTORY_STRING, SEPARATOR, SEPARATOR_CHAR |
| Constructor Summary | |
|---|---|
RelativeLocation(String relpath)
Create a new relative entity location from a normalized version of the given path. |
|
| Method Summary | |
|---|---|
int |
compareTo(RelativeLocation el)
|
RelativeLocation |
getChildLocation(String name)
Get the location of the named child entity relative to this location. |
String |
getLocation()
Get a string representation of the entity location. |
RelativeLocation |
getLocation(RelativeLocation loc)
Get the location of this entity location combined with the given relative location, represented by the same entity location type as this entity location. |
RelativeLocation |
getParentLocation()
Get the parent location of this entity location. |
String |
toString()
|
| Methods inherited from class org.entityfs.el.AbstractLocation |
|---|
equals, getBaseName, getExtension, getName, getPathSegmentStack, hashCode, isRootDir |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final RelativeLocation CURRENT_DIRECTORY
public static final RelativeLocation PARENT_DIRECTORY
| Constructor Detail |
|---|
public RelativeLocation(String relpath)
throws IllegalArgumentException
relpath - The string representation of the path to construct the
object from.
IllegalArgumentException - If the path is not a valid relative
path.| Method Detail |
|---|
public String getLocation()
EntityLocation
This always holds: new ELT(s).equals(new ELT(new
ELT(s).getLocation())) == true for all valid entity location strings
s and concrete entity location classes ELT.
getLocation in interface EntityLocation<RelativeLocation>public RelativeLocation getParentLocation()
EntityLocation
getParentLocation in interface EntityLocation<RelativeLocation>public RelativeLocation getChildLocation(String name)
EntityLocation
getChildLocation in interface EntityLocation<RelativeLocation>name - The child entity name.
public RelativeLocation getLocation(RelativeLocation loc)
EntityLocation
getLocation in interface EntityLocation<RelativeLocation>loc - The location relative to this entity location.
public int compareTo(RelativeLocation el)
compareTo in interface Comparable<RelativeLocation>public String toString()
toString in class AbstractLocation<RelativeLocation>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||