- Type Parameters:
T
- the type of thePath
; most notably not necessarily the type of the thing thePath
"points to"; more like an additional qualifier
A Path
can be used like a javax.naming.Name
, or like a java.nio.file.Path
, or like a java.net.URI
.
It differs from these other objects in that it combines some of
their concepts together.
- Author:
- Laird Nelson
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
An element normally within aPath
, consisting of aQualifiers
, a name, and an optional thing that it designates or points to.Nested classes/interfaces inherited from interface org.microbean.qualifier.Qualified
Qualified.Record<K extends Comparable<? super K>,
V extends Object, T extends Object> -
Constructor Summary
ConstructorDescriptionPath
(Path.Element<? extends T> lastElement) Creates a newPath
.Path
(Qualifiers<? extends String, ?> qualifiers, List<? extends Path.Element<?>> elements, Path.Element<? extends T> lastElement) Creates a newPath
.Path
(Qualifiers<? extends String, ?> qualifiers, Path.Element<? extends T> lastElement) Creates a newPath
. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
absolute()
Returnstrue
if and only if thisPath
is absolute, which means that its firstPath.Element
is a rootPath.Element
.final Optional<? extends ConstantDesc>
Returns anOptional
containing aConstantDesc
representing thisPath
, or an emptyOptional
if thisPath
cannot be represented as aConstantDesc
.final boolean
final boolean
endsWith
(Path<?> other, BiPredicate<? super Path.Element<?>, ? super Path.Element<?>> p) final boolean
final Path.Element<?>
get
(int index) Returns thePath.Element
found at the supplied zero-based index.final int
hashCode()
Returns a hashcode for thisPath
.final int
final int
indexOf
(Path<?> path, BiPredicate<? super Path.Element<?>, ? super Path.Element<?>> p) final boolean
isRoot()
final Iterator<Path.Element<?>>
iterator()
final Path.Element<T>
Returns the lastPath.Element
in thisPath
.final int
lastIndexOf
(Path<?> other) final int
lastIndexOf
(Path<?> path, BiPredicate<? super Path.Element<?>, ? super Path.Element<?>> p) static final <T> Path<T>
of
(Path.Element<? extends T> lastElement) Returns a (usually new)Path
formed from the suppliedlastElement
.static final <T> Path<T>
of
(Qualifiers<? extends String, ?> pathQualifiers, List<? extends Path.Element<?>> elements, Path.Element<? extends T> lastElement) Return a (usually new)Path
formed from the supplied arguments and returns it.static final <T> Path<T>
of
(Qualifiers<? extends String, ?> pathQualifiers, Path.Element<? extends T> lastElement) Return a (usually new)Path
formed from the supplied arguments and returns it.static final <T> Path<T>
of
(T qualified) Returns a (usually new)Path
formed from aPath.Element
formed from the suppliedqualified
and an empty name.static final <T> Path<T>
Returns a (usually new)Path
formed from aPath.Element
formed from the suppliedqualified
and the supplied name.static final <T> Path<T>
Returns a (usually new)Path
formed fromPath.Element
s formed from the suppliedqualified
and the supplied array of names.static final <T> Path<T>
Returns a (usually new)Path
formed fromPath.Element
s formed from the suppliedqualified
and the suppliedList
of names.final Stream<Path.Element<?>>
final <U> Path<U>
plus
(Collection<? extends Path.Element<?>> elements, Path.Element<? extends U> lastElement) Returns a newPath
consisting of thisPath
's qualifiers, thisPath
's elements, the suppliedelements
, and the suppliedlastElement
.final <U> Path<U>
plus
(Path.Element<? extends U> element) final <U> Path<U>
Returns a newPath
consisting of thisPath
's qualifiers combined with a prefixed version of the suppliedPath
's qualifiers, thisPath
's elements, the suppliedPath
's elements, and the suppliedPath
's last element.final T
Calls thePath.Element.qualified()
method on the last element in thisPath
and returns the result.final Qualifiers<String,
Object> Returns theQualifiers
that qualifies thisPath
.static final Path<?>
root()
Returns aPath
that is a root path.final int
size()
final Spliterator<Path.Element<?>>
final boolean
startsWith
(Path<?> other) final boolean
startsWith
(Path<?> other, BiPredicate<? super Path.Element<?>, ? super Path.Element<?>> p) final Stream<Path.Element<?>>
stream()
final String
toString()
Transliterates thisPath
into another, semantically equivalentPath
by producing aPath
that is otherwise equal to thisPath
but that will returntrue
from itstransliterated()
method.final @Experimental Path<T>
transliterate
(BiFunction<? super String, ? super Path.Element<?>, ? extends Path.Element<?>> f) Transliterates thisPath
into another, semantically equivalentPath
by applying the suppliedBiFunction
, and returns the transliteratedPath
.final boolean
-
Constructor Details
-
Path
Creates a newPath
.- Parameters:
lastElement
- the last element of thisPath
; must not benull
- Throws:
NullPointerException
- if any parameter isnull
- See Also:
-
Path
Creates a newPath
.- Parameters:
qualifiers
- thePath
's qualifiers; must not benull
lastElement
- the last element of thisPath
; must not benull
- Throws:
NullPointerException
- if any parameter isnull
- See Also:
-
Path
public Path(Qualifiers<? extends String, ?> qualifiers, List<? extends Path.Element<?>> elements, Path.Element<? extends T> lastElement) Creates a newPath
.- Parameters:
qualifiers
- thePath
's qualifiers; must not benull
elements
- the elements of thisPath
; must not benull
; may be emptylastElement
- the last element of thisPath
; must not benull
- Throws:
NullPointerException
- if any parameter isnull
-
-
Method Details
-
transliterated
- Returns:
true
if thisPath
is transliterated;false
otherwise
-
transliterate
Transliterates thisPath
into another, semantically equivalentPath
by producing aPath
that is otherwise equal to thisPath
but that will returntrue
from itstransliterated()
method.Transliteration can be needed when a
Path
is defined by a Java class and used by an application containing that Java class—because another Java class may have used the same element names to refer to different things.If this
Path
is already transliterated then it is returned.This method calls
transliterate(BiFunction)
withnull
as its sole argument. -
transliterate
@Experimental public final @Experimental Path<T> transliterate(BiFunction<? super String, ? super Path.Element<?>, ? extends Path.Element<?>> f) Transliterates thisPath
into another, semantically equivalentPath
by applying the suppliedBiFunction
, and returns the transliteratedPath
.The supplied
BiFunction
accepts a Java package name as its first argument, which will be the first package name encountered in the current thread's stack that identifies a caller whose package name is not equal toPath.class.getPackageName()
. Its second argument is aElement
from thisPath
. It must return aPath.Element
representing the transliteration of its second argument (which may be the second argument itself).Transliteration can be needed when a
Path
is defined by a Java class and used by an application containing that Java class—because another Java class may have used the same element names to refer to different things.If this
Path
is already transliterated then it is returned.- Parameters:
f
- aBiFunction
responsible for the transliteration, element by element; may benull
- Returns:
- the transliterated
Path
, which may be thisPath
; nevernull
- See Also:
- Idempotency:
- This method is idempotent and deterministic, but the
supplied
BiFunction
may not be. - Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple
threads, but the supplied
BiFunction
may not be.
-
describeConstable
Returns anOptional
containing aConstantDesc
representing thisPath
, or an emptyOptional
if thisPath
cannot be represented as aConstantDesc
.A
Path
instance may be represented by aConstantDesc
only when the return value of an invocation of thePath.Element.describeConstable()
method on its last element returns a non-emptyOptional
.- Specified by:
describeConstable
in interfaceConstable
- Specified by:
describeConstable
in interfaceQualified<String,
Object, T> - Returns:
- an
Optional
containing aConstantDesc
representing thisPath
; nevernull
; possibly empty - See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
qualifiers
Returns theQualifiers
that qualifies thisPath
.- Specified by:
qualifiers
in interfaceQualified<String,
Object, T> - Returns:
- the
Qualifiers
that qualifies thisPath
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
get
Returns thePath.Element
found at the supplied zero-based index.- Parameters:
index
- the index of thePath.Element
to return; must be0
or greater and less than thisPath
's size- Returns:
- the
Path.Element
found at the supplied zero-based index - Throws:
IndexOutOfBoundsException
- ifindex
does not meet the requirements described above- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
iterator
- Specified by:
iterator
in interfaceIterable<T>
- Returns:
- an
Iterator
that iterates over the elements of thisPath
, including the last element - Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
spliterator
- Specified by:
spliterator
in interfaceIterable<T>
- Returns:
- a
Spliterator
for the elements of thisPath
, including the last element - Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
stream
- Returns:
- a possibly parallel
Stream
of thisPath
'sPath.Element
s - Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
parallelStream
- Returns:
- a possibly parallel
Stream
of thisPath
'sPath.Element
s - Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
size
- Returns:
- the number of
Path.Element
s in thisPath
- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
indexOf
Returns the zero-based index identifying the position of the first occurrence of aPath
equal to the suppliedPath
within thisPath
, or a negative value if the suppliedPath
does not occur within thisPath
.- Parameters:
other
- the otherPath
; must not benull
- Returns:
- the zero-based index identifying the position of the
first occurrence of a
Path
equal to suppliedPath
within thisPath
, or a negative value if the suppliedPath
does not occur within thisPath
- Throws:
NullPointerException
- ifother
isnull
- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
indexOf
public final int indexOf(Path<?> path, BiPredicate<? super Path.Element<?>, ? super Path.Element<?>> p) Returns the zero-based index identifying the position of the first occurrence of aPath
equal to suppliedPath
within thisPath
, or a negative value if the suppliedPath
does not occur within thisPath
.The supplied
BiPredicate
is used to test eachPath.Element
of the suppliedPath
againstPath.Element
s from thisPath
. The first argument is aPath.Element
drawn from thisPath
. The second argument is anPath.Element
drawn from the suppliedPath
. TheBiPredicate
returnstrue
if its arguments are deemed to match. The suppliedBiPredicate
'sBiPredicate.test(Object, Object)
method must be idempotent and deterministic.- Parameters:
path
- the otherPath
; must not benull
p
- theBiPredicate
used to testPath.Element
s; must not benull
- Returns:
- the zero-based index identifying the position of the
first occurrence of a
Path
equal to suppliedPath
within thisPath
, or a negative value if the suppliedPath
does not occur within thisPath
- Throws:
NullPointerException
- if eitherpath
orp
isnull
- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
startsWith
Returnstrue
if thisPath
starts with aPath
that is equal to the suppliedPath
.This method returns
true
if and only if:other
is identical to thisPath
, or- An invocation of the
indexOf(Path)
method withother
as its sole argument returns0
- Parameters:
other
- the otherPath
; must not benull
- Returns:
true
if thisPath
starts with aPath
that is equal to the suppliedPath
;false
otherwise- Throws:
NullPointerException
- ifother
isnull
- See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
lastElement
Returns the lastPath.Element
in thisPath
.- Returns:
- the last
Path.Element
in thisPath
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
lastIndexOf
Returns the zero-based index identifying the position of the last occurrence of aPath
equal to the suppliedPath
within thisPath
, or a negative value if the suppliedPath
does not occur within thisPath
.- Parameters:
other
- the otherPath
; must not benull
- Returns:
- the zero-based index identifying the position of the
last occurrence of a
Path
equal to suppliedPath
within thisPath
, or a negative value if the suppliedPath
does not occur within thisPath
- Throws:
NullPointerException
- ifother
isnull
- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
lastIndexOf
public final int lastIndexOf(Path<?> path, BiPredicate<? super Path.Element<?>, ? super Path.Element<?>> p) Returns the zero-based index identifying the position of the last occurrence of aPath
equal to suppliedPath
within thisPath
, or a negative value if the suppliedPath
does not occur within thisPath
.The supplied
BiPredicate
is used to test eachPath.Element
of the suppliedPath
againstPath.Element
s from thisPath
. The first argument is aPath.Element
drawn from thisPath
. The second argument is anPath.Element
drawn from the suppliedPath
. TheBiPredicate
returnstrue
if its arguments are deemed to match. The suppliedBiPredicate
'sBiPredicate.test(Object, Object)
method must be idempotent and deterministic.- Parameters:
path
- the otherPath
; must not benull
p
- theBiPredicate
used to testPath.Element
s; must not benull
- Returns:
- the zero-based index identifying the position of the
last occurrence of a
Path
equal to suppliedPath
within thisPath
, or a negative value if the suppliedPath
does not occur within thisPath
- Throws:
NullPointerException
- if eitherpath
orp
isnull
- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
startsWith
public final boolean startsWith(Path<?> other, BiPredicate<? super Path.Element<?>, ? super Path.Element<?>> p) Returnstrue
if thisPath
starts with aPath
that is equal to the suppliedPath
.The supplied
BiPredicate
is used to test eachPath.Element
of the suppliedPath
againstPath.Element
s from thisPath
. The first argument is aPath.Element
drawn from thisPath
. The second argument is aPath.Element
drawn from the suppliedPath
. TheBiPredicate
returnstrue
if its arguments are deemed to match. The suppliedBiPredicate
'sBiPredicate.test(Object, Object)
method must be idempotent and deterministic.This method returns
true
if and only if:other
is identical to thisPath
, or- An invocation of the
indexOf(Path, BiPredicate)
method withother
andp
as its arguments returns0
- Parameters:
other
- the otherPath
; must not benull
p
- theBiPredicate
used to testPath.Element
s; must not benull
- Returns:
true
if thisPath
starts with aPath
that is equal to the suppliedPath
;false
otherwise- Throws:
NullPointerException
- ifother
isnull
- See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
endsWith
Returnstrue
if thisPath
ends with aPath
that is equal to the suppliedPath
.This method returns
true
if and only if:- Parameters:
other
- the otherPath
; must not benull
- Returns:
true
if thisPath
ends with aPath
that is equal to the suppliedPath
;false
otherwise- Throws:
NullPointerException
- ifother
isnull
- See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
endsWith
public final boolean endsWith(Path<?> other, BiPredicate<? super Path.Element<?>, ? super Path.Element<?>> p) Returnstrue
if thisPath
ends with aPath
that is equal to the suppliedPath
.The supplied
BiPredicate
is used to test eachPath.Element
of the suppliedPath
againstPath.Element
s from thisPath
. The first argument is aPath.Element
drawn from thisPath
. The second argument is aPath.Element
drawn from the suppliedPath
. TheBiPredicate
returnstrue
if its arguments are deemed to match. The suppliedBiPredicate
'sBiPredicate.test(Object, Object)
method must be idempotent and deterministic.This method returns
true
if and only if:- Parameters:
other
- the otherPath
; must not benull
p
- theBiPredicate
used to testPath.Element
s; must not benull
- Returns:
true
if thisPath
ends with aPath
that is equal to the suppliedPath
;false
otherwise- Throws:
NullPointerException
- ifother
isnull
- See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
qualified
Calls thePath.Element.qualified()
method on the last element in thisPath
and returns the result.- Specified by:
qualified
in interfaceQualified<String,
Object, T> - Returns:
- the result of invoking the
Path.Element.qualified()
method on the last element in thisPath
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method may return
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
isRoot
Returnstrue
if thisPath
is a root path, which is true when it has only one element and that element is root.- Returns:
true
if thisPath
is a root path;false
otherwise- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
absolute
Returnstrue
if and only if thisPath
is absolute, which means that its firstPath.Element
is a rootPath.Element
.- Returns:
true
if and only if thisPath
is absolute
-
hashCode
Returns a hashcode for thisPath
. -
equals
- Overrides:
equals
in classObject
- Parameters:
other
- theObject
to test; may benull
in which casefalse
will be returned- Returns:
true
if and only if the suppliedObject
is equal to thisPath
- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
plus
- Type Parameters:
U
- the type of the newPath
- Parameters:
element
- the newPath
's last element; must not benull
- Returns:
- a new
Path
consisting of thisPath
's qualifiers and elments plus the supplied element - Throws:
NullPointerException
- ifelement
isnull
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
plus
public final <U> Path<U> plus(Collection<? extends Path.Element<?>> elements, Path.Element<? extends U> lastElement) Returns a newPath
consisting of thisPath
's qualifiers, thisPath
's elements, the suppliedelements
, and the suppliedlastElement
.- Type Parameters:
U
- the type of the newPath
- Parameters:
elements
- additional elements; must not benull
lastElement
- the newPath
's last element; must not benull
- Returns:
- a new
Path
consisting of thisPath
's qualifiers, thisPath
's elements, the suppliedelements
, and the suppliedlastElement
- Throws:
NullPointerException
- ifelement
isnull
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
plus
Returns a newPath
consisting of thisPath
's qualifiers combined with a prefixed version of the suppliedPath
's qualifiers, thisPath
's elements, the suppliedPath
's elements, and the suppliedPath
's last element.The new
Path
's qualifiers are those of thisPath
plus those of the suppliedPath
, where each qualifier in the suppliedPath
's qualifiers has been prefixed with aString
formed from the names of all the elements in thisPath
.- Type Parameters:
U
- the type of the newPath
- Parameters:
path
- thePath
to logically append; must not benull
- Returns:
- a new
Path
consisting of thisPath
's qualifiers combined with a prefixed version of the suppliedPath
's qualifiers, thisPath
's elements, the suppliedPath
's elements, and the suppliedPath
's last element - Throws:
NullPointerException
- ifpath
isnull
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
toString
-
root
Returns aPath
that is a root path.- Returns:
- a
Path
that is a root path - See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
of
Returns a (usually new)Path
formed from aPath.Element
formed from the suppliedqualified
and an empty name.- Type Parameters:
T
- the type of thePath
- Parameters:
qualified
- the qualified item of what will be the lastPath.Element
- Returns:
- a
Path
- Throws:
NullPointerException
- ifqualified
isnull
- See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
of
Returns a (usually new)Path
formed from aPath.Element
formed from the suppliedqualified
and the supplied name.- Type Parameters:
T
- the type of thePath
- Parameters:
qualified
- the qualified item of what will be the lastPath.Element
name
- the name of what will be the lastPath.Element
- Returns:
- a
Path
- Throws:
NullPointerException
- ifname
isnull
IllegalArgumentException
- ifqualified
isnull
and name isnull
or an emptyString
}- See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
of
Returns a (usually new)Path
formed fromPath.Element
s formed from the suppliedqualified
and the supplied array of names.- Type Parameters:
T
- the type of thePath
- Parameters:
qualified
- the qualified item of what will be the lastPath.Element
names
- an array of names from whichPath.Element
s will be synthesized; must not benull
- Returns:
- a
Path
- Throws:
NullPointerException
- ifnames
isnull
IllegalArgumentException
- ifqualified
isnull
and the last element ofnames
is an emptyString
- See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
of
Returns a (usually new)Path
formed from the suppliedlastElement
.- Type Parameters:
T
- the type of thePath
- Parameters:
lastElement
- the lastPath.Element
; must not benull
- Returns:
- a
Path
- Throws:
NullPointerException
- iflastElement
isnull
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
of
Returns a (usually new)Path
formed fromPath.Element
s formed from the suppliedqualified
and the suppliedList
of names.- Type Parameters:
T
- the type of thePath
- Parameters:
qualified
- the qualified item of what will be the lastPath.Element
names
- aList
of names from whichPath.Element
s will be synthesized; must not benull
- Returns:
- a
Path
- Throws:
NullPointerException
- ifnames
isnull
IllegalArgumentException
- ifqualified
isnull
and the last element ofnames
is an emptyString
- See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
of
public static final <T> Path<T> of(Qualifiers<? extends String, ?> pathQualifiers, Path.Element<? extends T> lastElement) Return a (usually new)Path
formed from the supplied arguments and returns it.- Type Parameters:
T
- the type of thePath
- Parameters:
pathQualifiers
- thePath
's qualifiers; must not benull
lastElement
- the lastElement
of thePath
; must not benull
- Returns:
- a (usually new)
Path
- Throws:
NullPointerException
- if any argument isnull
- See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
of
public static final <T> Path<T> of(Qualifiers<? extends String, ?> pathQualifiers, List<? extends Path.Element<?>> elements, Path.Element<? extends T> lastElement) Return a (usually new)Path
formed from the supplied arguments and returns it.- Type Parameters:
T
- the type of the newPath
- Parameters:
pathQualifiers
- thePath
's qualifiers; must not benull
elements
- the interiorPath.Element
s of thePath
; must not benull
lastElement
- the lastElement
of thePath
; must not benull
- Returns:
- a (usually new)
Path
- Throws:
NullPointerException
- if any argument isnull
- See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-