public class Address extends Object
| Constructor and Description |
|---|
Address()
Create an empty address
|
Address(Address other)
Construct an Address by cloning another
|
Address(String path)
Construct an Address from a path in the form (key=value)?(,key=value)*
|
Address(String key,
String value)
Create an Address with an initial path element
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Address address)
Add a whole address to the given path
|
void |
add(String key,
String value)
Add a key value pair to the path
|
void |
addSegment(String segment) |
String |
get(int n)
Returns the n'th path element of the address
|
Address |
getParent()
Return the parent Address of the current one.
|
String |
getPath()
Returns the Address as a string
|
boolean |
isEmpty()
Indicates if this Address has path elements
|
int |
size()
Returns the number of path elements of this address
|
String |
toString() |
public Address()
public Address(String key, String value)
key - key part of the pathvalue - value part of the pathpublic Address(Address other)
other - Address to clonepublic Address(String path)
path - Path string to parsepublic void add(String key, String value)
key - Key part of this path elementvalue - Value part of this path elementpublic void addSegment(String segment)
public String getPath()
public void add(Address address)
address - Other addressAddress(Address)public boolean isEmpty()
public int size()
public String get(int n)
n - Number of the wanted path elementpublic Address getParent()
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.