Class PathAddress
java.lang.Object
org.wildfly.galleon.plugin.doc.generator.PathAddress
- All Implemented Interfaces:
Iterable<PathElement>
A path address for an operation.
- Author:
- Brian Stansberry, David M. Lloyd
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionappend(List<PathElement> additionalElements) Create a new path address by appending more elements to the end of this address.append(PathAddress address) Create a new path address by appending more elements to the end of this address.append(PathElement... additionalElements) Create a new path address by appending more elements to the end of this address.booleanDetermine whether this object is equal to another.booleanequals(PathAddress other) Determine whether this object is equal to another.getElement(int index) Gets the element at the given index.Gets the last element in the address.inthashCode()booleanCheck whether this address applies to multiple targets.iterator()Iterate over the elements of this path address.org.jboss.dmr.ModelNodenavigate(org.jboss.dmr.ModelNode model, boolean create) Navigate to this address in the given model node.static PathAddressparseCLIStyleAddress(String address) static PathAddresspathAddress(String key, String value) static PathAddresspathAddress(List<PathElement> elements) static PathAddresspathAddress(org.jboss.dmr.ModelNode node) Creates a PathAddress from the given ModelNode address.static PathAddresspathAddress(PathAddress parent, PathElement... elements) static PathAddresspathAddress(PathElement... elements) org.jboss.dmr.ModelNoderemove(org.jboss.dmr.ModelNode model) Navigate to, and remove, this address in the given model node.intsize()Get the size of this path, in elements.subAddress(int start) Get a portion of this address using segments starting atstart(inclusive).subAddress(int start, int end) Get a portion of this address using segments betweenstart(inclusive) andend(exclusive).org.jboss.dmr.ModelNodeConvert this path address to its model node representation.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
EMPTY_ADDRESS
An empty address.
-
-
Method Details
-
pathAddress
Creates a PathAddress from the given ModelNode address. The given node is expected to be an address node.- Parameters:
node- the node (cannot benull)- Returns:
- the update identifier
-
pathAddress
-
pathAddress
-
pathAddress
-
pathAddress
-
getElement
Gets the element at the given index.- Parameters:
index- the index- Returns:
- the element
- Throws:
IndexOutOfBoundsException- if the index is out of range (index < 0 || index >= size())
-
getLastElement
Gets the last element in the address.- Returns:
- the element, or
nullifsize()is zero.
-
subAddress
Get a portion of this address using segments starting atstart(inclusive).- Parameters:
start- the start index- Returns:
- the partial address
-
subAddress
Get a portion of this address using segments betweenstart(inclusive) andend(exclusive).- Parameters:
start- the start indexend- the end index- Returns:
- the partial address
-
append
Create a new path address by appending more elements to the end of this address.- Parameters:
additionalElements- the elements to append- Returns:
- the new path address
-
append
Create a new path address by appending more elements to the end of this address.- Parameters:
additionalElements- the elements to append- Returns:
- the new path address
-
append
Create a new path address by appending more elements to the end of this address.- Parameters:
address- the address to append- Returns:
- the new path address
-
append
-
append
-
remove
Navigate to, and remove, this address in the given model node.- Parameters:
model- the model node- Returns:
- the submodel
- Throws:
NoSuchElementException- if the model contains no such element
-
toModelNode
public org.jboss.dmr.ModelNode toModelNode()Convert this path address to its model node representation.- Returns:
- the model node list of properties
-
isMultiTarget
public boolean isMultiTarget()Check whether this address applies to multiple targets.- Returns:
trueif the address can apply to multiple targets,falseotherwise
-
size
public int size()Get the size of this path, in elements.- Returns:
- the size
-
iterator
Iterate over the elements of this path address.- Specified by:
iteratorin interfaceIterable<PathElement>- Returns:
- the iterator
-
getParent
-
hashCode
public int hashCode() -
equals
Determine whether this object is equal to another. -
equals
Determine whether this object is equal to another.- Parameters:
other- the other object- Returns:
trueif they are equal,falseotherwise
-
toString
-
toCLIStyleString
-
toHttpStyleString
-
toPathStyleString
-
parseCLIStyleAddress
- Throws:
IllegalArgumentException
-