public class PathAddress extends Object implements Iterable<PathElement>
| Modifier and Type | Field and Description |
|---|---|
static PathAddress |
EMPTY_ADDRESS
An empty address.
|
| Modifier and Type | Method and Description |
|---|---|
PathAddress |
append(List<PathElement> additionalElements)
Create a new path address by appending more elements to the end of this address.
|
PathAddress |
append(PathAddress address)
Create a new path address by appending more elements to the end of this address.
|
PathAddress |
append(PathElement... additionalElements)
Create a new path address by appending more elements to the end of this address.
|
PathAddress |
append(String key) |
PathAddress |
append(String key,
String value) |
boolean |
equals(Object other)
Determine whether this object is equal to another.
|
boolean |
equals(PathAddress other)
Determine whether this object is equal to another.
|
PathElement |
getElement(int index)
Gets the element at the given index.
|
PathElement |
getLastElement()
Gets the last element in the address.
|
PathAddress |
getParent() |
int |
hashCode() |
boolean |
isMultiTarget()
Check whether this address applies to multiple targets.
|
ListIterator<PathElement> |
iterator()
Iterate over the elements of this path address.
|
org.jboss.dmr.ModelNode |
navigate(org.jboss.dmr.ModelNode model,
boolean create)
Navigate to this address in the given model node.
|
static PathAddress |
pathAddress(List<PathElement> elements) |
static PathAddress |
pathAddress(org.jboss.dmr.ModelNode node)
Creates a PathAddress from the given ModelNode address.
|
static PathAddress |
pathAddress(PathAddress parent,
PathElement... elements) |
static PathAddress |
pathAddress(PathElement... elements) |
static PathAddress |
pathAddress(String key,
String value) |
org.jboss.dmr.ModelNode |
remove(org.jboss.dmr.ModelNode model)
Navigate to, and remove, this address in the given model node.
|
int |
size()
Get the size of this path, in elements.
|
PathAddress |
subAddress(int start)
Get a portion of this address using segments starting at
start (inclusive). |
PathAddress |
subAddress(int start,
int end)
Get a portion of this address using segments between
start (inclusive) and end (exclusive). |
String |
toCLIStyleString() |
String |
toHttpStyleString() |
org.jboss.dmr.ModelNode |
toModelNode()
Convert this path address to its model node representation.
|
String |
toString() |
public static final PathAddress EMPTY_ADDRESS
public static PathAddress pathAddress(org.jboss.dmr.ModelNode node)
node - the node (cannot be null)public static PathAddress pathAddress(List<PathElement> elements)
public static PathAddress pathAddress(PathElement... elements)
public static PathAddress pathAddress(String key, String value)
public static PathAddress pathAddress(PathAddress parent, PathElement... elements)
public PathElement getElement(int index)
index - the indexIndexOutOfBoundsException - if the index is out of range
(index < 0 || index >= size())public PathElement getLastElement()
null if size() is zero.public PathAddress subAddress(int start)
start (inclusive).start - the start indexpublic PathAddress subAddress(int start, int end)
start (inclusive) and end (exclusive).start - the start indexend - the end indexpublic PathAddress append(List<PathElement> additionalElements)
additionalElements - the elements to appendpublic PathAddress append(PathElement... additionalElements)
additionalElements - the elements to appendpublic PathAddress append(PathAddress address)
address - the address to appendpublic PathAddress append(String key, String value)
public PathAddress append(String key)
public org.jboss.dmr.ModelNode navigate(org.jboss.dmr.ModelNode model,
boolean create)
throws NoSuchElementException
model - the model nodecreate - true to create the last part of the node if it does not existNoSuchElementException - if the model contains no such elementpublic org.jboss.dmr.ModelNode remove(org.jboss.dmr.ModelNode model)
throws NoSuchElementException
model - the model nodeNoSuchElementException - if the model contains no such elementpublic org.jboss.dmr.ModelNode toModelNode()
public boolean isMultiTarget()
true if the address can apply to multiple targets, false otherwisepublic int size()
public ListIterator<PathElement> iterator()
iterator in interface Iterable<PathElement>public PathAddress getParent()
public boolean equals(Object other)
public boolean equals(PathAddress other)
other - the other objecttrue if they are equal, false otherwisepublic String toCLIStyleString()
public String toHttpStyleString()
Copyright © 2015 JBoss by Red Hat. All rights reserved.