Modifier and Type | Field and Description |
---|---|
protected int |
level |
protected String |
location |
protected String |
name |
protected Node |
parent |
static char |
PATH_SEPARATOR |
static String |
PATH_SEPARATOR_STR |
static String |
ROOT |
Constructor and Description |
---|
NodeBase()
Default constructor
|
NodeBase(String path)
Construct a node from its path
|
NodeBase(String name,
String location)
Construct a node from its name and its location
|
NodeBase(String name,
String location,
Node parent,
int level)
Construct a node from its name and its location
|
Modifier and Type | Method and Description |
---|---|
int |
getLevel()
Return this node's level in the tree.
|
String |
getName()
Return this node's name
|
String |
getNetworkLocation()
Return this node's network location
|
Node |
getParent()
Return this node's parent
|
static String |
getPath(Node node)
Return this node's path
|
static String |
normalize(String path)
Normalize a path
|
void |
setLevel(int level)
Set this node's level in the tree
|
void |
setNetworkLocation(String location)
Set this node's network location
|
void |
setParent(Node parent)
Set this node's parent
|
String |
toString()
Return this node's string representation
|
public static final char PATH_SEPARATOR
public static final String PATH_SEPARATOR_STR
public static final String ROOT
protected String name
protected String location
protected int level
protected Node parent
public NodeBase()
public NodeBase(String path)
path
- a concatenation of this node's location, the path seperator, and its namepublic NodeBase(String name, String location)
name
- this node's namelocation
- this node's locationpublic String getNetworkLocation()
getNetworkLocation
in interface Node
public void setNetworkLocation(String location)
setNetworkLocation
in interface Node
public String toString()
public Node getParent()
public void setParent(Node parent)
public int getLevel()
Copyright © 2010 The Apache Software Foundation