Package org.jboss.as.controller
Class PathElement
- java.lang.Object
-
- org.jboss.as.controller.PathElement
-
public class PathElement extends Object
An element of a path specification for matching operations with addresses.- Author:
- Brian Stansberry, David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description static String
WILDCARD_VALUE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
Determine whether this object is equal to another.boolean
equals(PathElement other)
Determine whether this object is equal to another.String
getKey()
Get the path key.String[]
getKeyValuePair()
String[]
getSegments()
String
getValue()
Get the path value.int
hashCode()
boolean
isMultiTarget()
boolean
isWildcard()
Determine whether the value is the wildcard value.boolean
matches(PathElement pe)
Determine whether the given element matches this element.boolean
matches(org.jboss.dmr.Property property)
Determine whether the given property matches this element.static PathElement
pathElement(String key)
Construct a new instance with a wildcard value.static PathElement
pathElement(String key, String value)
Construct a new instance.String
toString()
-
-
-
Field Detail
-
WILDCARD_VALUE
public static final String WILDCARD_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
pathElement
public static PathElement pathElement(String key)
Construct a new instance with a wildcard value.- Parameters:
key
- the path key to match- Returns:
- the new path element
-
pathElement
public static PathElement pathElement(String key, String value)
Construct a new instance.- Parameters:
key
- the path key to matchvalue
- the path value or wildcard to match- Returns:
- the new path element
-
getKey
public String getKey()
Get the path key.- Returns:
- the path key
-
getValue
public String getValue()
Get the path value.- Returns:
- the path value
-
matches
public boolean matches(org.jboss.dmr.Property property)
Determine whether the given property matches this element. A property matches this element when property name and this key are equal, values are equal or this element value is a wildcard.- Parameters:
property
- the property to check- Returns:
true
if the property matches
-
matches
public boolean matches(PathElement pe)
Determine whether the given element matches this element. An element matches this element when keys are equal, values are equal or this element value is a wildcard.- Parameters:
pe
- the element to check- Returns:
true
if the element matches
-
isWildcard
public boolean isWildcard()
Determine whether the value is the wildcard value.- Returns:
true
if the value is the wildcard value
-
isMultiTarget
public boolean isMultiTarget()
-
getSegments
public String[] getSegments()
-
getKeyValuePair
public String[] getKeyValuePair()
-
equals
public boolean equals(Object other)
Determine whether this object is equal to another.
-
equals
public boolean equals(PathElement other)
Determine whether this object is equal to another.- Parameters:
other
- the other object- Returns:
true
if they are equal,false
otherwise
-
-