- java.lang.Object
-
- swim.uri.UriPart
-
- swim.uri.UriPath
-
- All Implemented Interfaces:
Comparable<UriPath>,Iterable<String>,Collection<String>,Debug,Display
public abstract class UriPath extends UriPart implements Collection<String>, Comparable<UriPath>, Debug, Display
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanadd(String component)booleanaddAll(Collection<? extends String> components)UriPathappended(String component)UriPathappended(String... components)UriPathappended(Collection<? extends String> components)UriPathappendedSegment(String segment)UriPathappendedSlash()abstract UriPathbase()abstract UriPathbody()static UriPathBuilderbuilder()voidclear()intcompareTo(UriPath that)static UriPathcomponent(String component)booleancontains(Object component)booleancontainsAll(Collection<?> components)abstract voiddebug(Output<?> output)Writes a developer readable, debug-formatted string representation of this object tooutput.abstract voiddisplay(Output<?> output)Writes a human readable, display-formatted string representation of this object tooutput.static UriPathempty()booleanequals(Object other)UriPathfoot()static UriPathfrom(String... components)static UriPathfrom(Collection<? extends String> components)inthashCode()abstract Stringhead()abstract booleanisAbsolute()booleanisChildOf(UriPath b)abstract booleanisDefined()abstract booleanisEmpty()abstract booleanisRelative()booleanisRelativeTo(UriPath b)Iterator<String>iterator()UriPathmerge(UriPath that)Stringname()UriPathname(String name)abstract UriPathparent()static UriPathparse(String string)static Form<UriPath>pathForm()UriPathprepended(String component)UriPathprepended(String... components)UriPathprepended(Collection<? extends String> components)UriPathprependedSegment(String segment)UriPathprependedSlash()booleanremove(Object component)booleanremoveAll(Collection<?> components)UriPathremoveDotSegments()UriPathresolve(UriPath that)booleanretainAll(Collection<?> components)static UriPathsegment(String segment)intsize()static UriPathslash()abstract UriPathtail()Object[]toArray()<T> T[]toArray(T[] array)abstract StringtoString()UriPathunmerge(UriPath that)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Method Detail
-
builder
public static UriPathBuilder builder()
-
empty
public static UriPath empty()
-
slash
public static UriPath slash()
-
from
public static UriPath from(Collection<? extends String> components)
-
isDefined
public abstract boolean isDefined()
-
isAbsolute
public abstract boolean isAbsolute()
-
isRelative
public abstract boolean isRelative()
-
isEmpty
public abstract boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<String>
-
size
public int size()
- Specified by:
sizein interfaceCollection<String>
-
head
public abstract String head()
-
tail
public abstract UriPath tail()
-
parent
public abstract UriPath parent()
-
base
public abstract UriPath base()
-
name
public String name()
-
body
public abstract UriPath body()
-
foot
public UriPath foot()
-
isRelativeTo
public boolean isRelativeTo(UriPath b)
-
isChildOf
public boolean isChildOf(UriPath b)
-
contains
public boolean contains(Object component)
- Specified by:
containsin interfaceCollection<String>
-
containsAll
public boolean containsAll(Collection<?> components)
- Specified by:
containsAllin interfaceCollection<String>
-
add
public boolean add(String component)
- Specified by:
addin interfaceCollection<String>
-
addAll
public boolean addAll(Collection<? extends String> components)
- Specified by:
addAllin interfaceCollection<String>
-
remove
public boolean remove(Object component)
- Specified by:
removein interfaceCollection<String>
-
removeAll
public boolean removeAll(Collection<?> components)
- Specified by:
removeAllin interfaceCollection<String>
-
retainAll
public boolean retainAll(Collection<?> components)
- Specified by:
retainAllin interfaceCollection<String>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<String>
-
appended
public UriPath appended(Collection<? extends String> components)
-
appendedSlash
public UriPath appendedSlash()
-
prepended
public UriPath prepended(Collection<? extends String> components)
-
prependedSlash
public UriPath prependedSlash()
-
removeDotSegments
public UriPath removeDotSegments()
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<String>
-
toArray
public <T> T[] toArray(T[] array)
- Specified by:
toArrayin interfaceCollection<String>
-
compareTo
public final int compareTo(UriPath that)
- Specified by:
compareToin interfaceComparable<UriPath>
-
equals
public final boolean equals(Object other)
- Specified by:
equalsin interfaceCollection<String>- Overrides:
equalsin classObject
-
hashCode
public final int hashCode()
- Specified by:
hashCodein interfaceCollection<String>- Overrides:
hashCodein classObject
-
debug
public abstract void debug(Output<?> output)
Description copied from interface:DebugWrites a developer readable, debug-formatted string representation of this object tooutput.
-
display
public abstract void display(Output<?> output)
Description copied from interface:DisplayWrites a human readable, display-formatted string representation of this object tooutput.
-
-