限定符和类型 | 字段和说明 |
---|---|
protected int |
level |
protected String |
location |
protected String |
name |
protected Node |
parent |
static char |
PATH_SEPARATOR |
static String |
PATH_SEPARATOR_STR |
static String |
ROOT |
构造器和说明 |
---|
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
|
限定符和类型 | 方法和说明 |
---|---|
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
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
在接口中 Node
public void setNetworkLocation(String location)
setNetworkLocation
在接口中 Node
public int getLevel()
Copyright © 2009 The Apache Software Foundation