|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.stratos.lb.common.conf.structure.Node
public class Node
This is the basic data structure which holds a Nginx formatted configuration file.
| Constructor Summary | |
|---|---|
Node()
|
|
| Method Summary | |
|---|---|
void |
addProperty(String key,
String value)
Adds a new property to properties Map of this Node if and only if key is not null. |
void |
appendChild(Node aNode)
Appends a child node at the end of the List of child nodes of this Node, if a similar node is not already present as a child node. |
String |
childNodesToString(int indentation)
This will convert each child Node of this Node to a String. |
boolean |
equals(Object node)
|
Node |
findChildNodeByName(String name)
This will try to find a child Node of this Node, which has the given name. |
List<Node> |
getChildNodes()
Returns child nodes List of this Node. |
String |
getName()
Returns the name of this Node. |
Map<String,String> |
getProperties()
Returns properties Map of this Node. |
String |
getProperty(String key)
Returns the value of a given property. |
int |
hashCode()
|
String |
propertiesToString(int indentation)
Returns all the properties of this Node as a String. |
boolean |
removeChildNode(Node node)
Removes the first occurrence of a node equals to the given node. |
Node |
removeChildNode(String name)
Removes the first occurrence of a node having the given name and returns the removed Node. |
void |
setChildNodes(List<Node> childNodes)
|
void |
setName(String name)
Sets the name of this Node. |
void |
setProperties(Map<String,String> properties)
|
String |
toString()
Convert this Node to a String which is in Nginx format. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Node()
| Method Detail |
|---|
public void setChildNodes(List<Node> childNodes)
public void setProperties(Map<String,String> properties)
public String childNodesToString(int indentation)
public Node findChildNodeByName(String name)
name - name of the child node to find.
null.public String getName()
public List<Node> getChildNodes()
public Map<String,String> getProperties()
public String getProperty(String key)
key - name of a property.
null.public String propertiesToString(int indentation)
indentation - relative number of tabs
public Node removeChildNode(String name)
Node.
name - name of the child node to be removed.
Node or else null.public boolean removeChildNode(Node node)
node - Node to be removed.
public void setName(String name)
name - String to be set as the name.public void appendChild(Node aNode)
aNode - child Node to be appended.
public void addProperty(String key,
String value)
null.
key - name of the property to be added.value - value of the property to be added.public String toString()
ij {
klm n;
pq {
rst u;
}
}
toString in class Objectpublic boolean equals(Object node)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||