- 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 boolean
add(String component)
boolean
addAll(Collection<? extends String> components)
UriPath
appended(String component)
UriPath
appended(String... components)
UriPath
appended(Collection<? extends String> components)
UriPath
appendedSegment(String segment)
UriPath
appendedSlash()
abstract UriPath
base()
abstract UriPath
body()
static UriPathBuilder
builder()
void
clear()
int
compareTo(UriPath that)
static UriPath
component(String component)
boolean
contains(Object component)
boolean
containsAll(Collection<?> components)
abstract <T> Output<T>
debug(Output<T> output)
Writes a developer readable, debug-formatted string representation of this object tooutput
.abstract <T> Output<T>
display(Output<T> output)
Writes a human readable, display-formatted string representation of this object tooutput
.static UriPath
empty()
boolean
equals(Object other)
UriPath
foot()
static UriPath
from(Collection<? extends String> components)
int
hashCode()
abstract String
head()
abstract boolean
isAbsolute()
boolean
isChildOf(UriPath b)
abstract boolean
isDefined()
abstract boolean
isEmpty()
abstract boolean
isRelative()
boolean
isRelativeTo(UriPath b)
Iterator<String>
iterator()
UriPath
merge(UriPath that)
String
name()
UriPath
name(String name)
static UriPath
of(String... components)
abstract UriPath
parent()
static UriPath
parse(String string)
static Form<UriPath>
pathForm()
UriPath
prepended(String component)
UriPath
prepended(String... components)
UriPath
prepended(Collection<? extends String> components)
UriPath
prependedSegment(String segment)
UriPath
prependedSlash()
boolean
remove(Object component)
boolean
removeAll(Collection<?> components)
UriPath
removeDotSegments()
UriPath
resolve(UriPath that)
boolean
retainAll(Collection<?> components)
static UriPath
segment(String segment)
int
size()
static UriPath
slash()
abstract UriPath
tail()
Object[]
toArray()
<T> T[]
toArray(T[] array)
abstract String
toString()
UriPath
unmerge(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
-
isDefined
public abstract boolean isDefined()
-
isAbsolute
public abstract boolean isAbsolute()
-
isRelative
public abstract boolean isRelative()
-
isEmpty
public abstract boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<String>
-
size
public int size()
- Specified by:
size
in 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:
contains
in interfaceCollection<String>
-
containsAll
public boolean containsAll(Collection<?> components)
- Specified by:
containsAll
in interfaceCollection<String>
-
add
public boolean add(String component)
- Specified by:
add
in interfaceCollection<String>
-
addAll
public boolean addAll(Collection<? extends String> components)
- Specified by:
addAll
in interfaceCollection<String>
-
remove
public boolean remove(Object component)
- Specified by:
remove
in interfaceCollection<String>
-
removeAll
public boolean removeAll(Collection<?> components)
- Specified by:
removeAll
in interfaceCollection<String>
-
retainAll
public boolean retainAll(Collection<?> components)
- Specified by:
retainAll
in interfaceCollection<String>
-
clear
public void clear()
- Specified by:
clear
in 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:
toArray
in interfaceCollection<String>
-
toArray
public <T> T[] toArray(T[] array)
- Specified by:
toArray
in interfaceCollection<String>
-
compareTo
public final int compareTo(UriPath that)
- Specified by:
compareTo
in interfaceComparable<UriPath>
-
equals
public final boolean equals(Object other)
- Specified by:
equals
in interfaceCollection<String>
- Overrides:
equals
in classObject
-
hashCode
public final int hashCode()
- Specified by:
hashCode
in interfaceCollection<String>
- Overrides:
hashCode
in classObject
-
debug
public abstract <T> Output<T> debug(Output<T> output)
Description copied from interface:Debug
Writes a developer readable, debug-formatted string representation of this object tooutput
.
-
display
public abstract <T> Output<T> display(Output<T> output)
Description copied from interface:Display
Writes a human readable, display-formatted string representation of this object tooutput
.
-
empty
public static UriPath empty()
-
slash
public static UriPath slash()
-
from
public static UriPath from(Collection<? extends String> components)
-
builder
public static UriPathBuilder builder()
-
-