|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
it.could.util.location.Path
The Path class is an ordered collection of
Element instances representing a path
structure.
| Nested Class Summary | |
static class |
Path.Element
The Element class represents a path
element within the Path structure. |
| Field Summary |
| Fields inherited from class java.util.AbstractList |
modCount |
| Fields inherited from interface it.could.util.encoding.EncodingAware |
DEFAULT_ENCODING, PLATFORM_ENCODING |
| Constructor Summary | |
Path(List elements,
boolean absolute,
boolean collection)
Create a new Path instance. |
|
Path(List elements,
boolean absolute,
boolean collection,
Parameters parameters)
Create a new Path instance. |
|
| Method Summary | |
boolean |
equals(Object object)
Check if the specified Object is equal to this
Path instance. |
Object |
get(int index)
Return the Element instance at
the specified index. |
Parameters |
getParameters()
Returns the collection of Parameters
contained by this instance or null. |
int |
hashCode()
Return the hash code value of this Path instance. |
boolean |
isAbsolute()
Checks if this Path instance represents
an absolute path. |
boolean |
isCollection()
Checks if this Path instance represents
a collection. |
static Path |
parse(String path)
Parse the specified String into a Path structure. |
static Path |
parse(String path,
String encoding)
Parse the specified String into a Path structure. |
Path |
relativize(Path path)
Retrieve the relativization path from this Path to the
specified Path. |
Path |
relativize(String path)
Parse the specified String into a Path and relativize
it against this one. |
Path |
relativize(String path,
String encoding)
Parse the specified String into a Path and relativize
it against this one. |
Path |
resolve(Path path)
Resolve the specified Path against this one. |
Path |
resolve(String path)
Parse the specified String into a Path and resolve it
against this one. |
Path |
resolve(String path,
String encoding)
Parse the specified String into a Path and resolve it
against this one. |
int |
size()
Return the number of Element
instances contained by this instance. |
String |
toString()
Return the URL-encoded String representation of this
Path instance. |
String |
toString(String encoding)
Return the URL-encoded String representation of this
Path instance using the specified
character encoding. |
| Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
| Methods inherited from class java.util.AbstractCollection |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
public Path(List elements,
boolean absolute,
boolean collection)
Create a new Path instance.
ClassCastException - if any of the elements in the List
was not a Element.
public Path(List elements,
boolean absolute,
boolean collection,
Parameters parameters)
Create a new Path instance.
ClassCastException - if any of the elements in the List
was not a Element.| Method Detail |
public static Path parse(String path)
public static Path parse(String path,
String encoding)
throws UnsupportedEncodingException
public Path resolve(Path path)
Resolve the specified Path against this one.
public Path resolve(String path)
public Path resolve(String path,
String encoding)
throws UnsupportedEncodingException
Parse the specified String into a Path and resolve it
against this one.
NullPointerException - if the path String was null.
UnsupportedEncodingExceptionpublic Path relativize(String path)
public Path relativize(String path,
String encoding)
throws UnsupportedEncodingException
Parse the specified String into a Path and relativize
it against this one.
UnsupportedEncodingExceptionpublic Path relativize(Path path)
public Object get(int index)
Return the Element instance at
the specified index.
get in interface Listpublic int size()
Return the number of Element
instances contained by this instance.
size in interface Listpublic boolean isAbsolute()
Checks if this Path instance represents
an absolute path.
public boolean isCollection()
Checks if this Path instance represents
a collection.
public Parameters getParameters()
Returns the collection of Parameters
contained by this instance or null.
public String toString()
Return the URL-encoded String representation of this
Path instance.
toString in interface Encodable
public String toString(String encoding)
throws UnsupportedEncodingException
Return the URL-encoded String representation of this
Path instance using the specified
character encoding.
toString in interface EncodableUnsupportedEncodingException - if the specified encoding is not
supported by the platform.public int hashCode()
Return the hash code value of this
Path instance.
hashCode in interface Listpublic boolean equals(Object object)
Check if the specified Object is equal to this
Path instance.
The specified Object is considered equal to this one if
it is non-null, is a Path
instance and its string representation equals
this one's.
equals in interface List
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||