|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectantsnest.datastructure.DefaultAntNode
public abstract class DefaultAntNode
Implementation of an AntNode
AntNode,
Serialized Form| Constructor Summary | |
|---|---|
DefaultAntNode(int type)
Constructs a new node |
|
| Method Summary | |
|---|---|
void |
addAttribute(AntAttribute attribute)
Adds an attribute to the end of the list |
void |
addAttribute(AntAttribute attribute,
int position)
Adds an attribute to this node |
void |
addNode(AntNode node)
Adds a node to this node |
void |
addNode(AntNode node,
int position)
Adds a node to this node |
void |
changeAttribute(AntAttribute attribute)
Changes an attribute in the list |
abstract AntNode |
cloneNode(IDPool idPool)
Gets a clone of this node |
boolean |
equals(Object obj)
Whether this node is equal to another |
AntAttribute |
getAttribute(int position)
Gets an attribute from this node |
AntAttribute |
getAttribute(String name)
Gets the attribute with the required name |
int |
getAttributeSize()
Gets the number of attributes held by this node |
String |
getData()
Gets any character data stored in this node |
String |
getDescription()
Gets the description of this node |
IDPool |
getIDPool()
Gets the ID pool used by this node |
String |
getName()
Gets the name of this node |
AntNode |
getNode(int position)
Gets a node from this node |
long |
getNodeID()
Gets the ID of this node |
int |
getNodeSize()
Gets tthe number of nested elements held by thsi node |
AntNodeText |
getNodeText()
Gets the text node in this one, if any |
AntNode |
getParent()
Gets the parent of this node |
int |
getType()
Gets the type of this node |
int |
getTypeAt(int position)
Gets the type of the node at the specified position |
int |
indexOfAttribute(AntAttribute attribute)
Gets the index of an attribute in this node |
int |
indexOfNode(AntNode node)
Gets the index of a node nested in this node |
void |
moveAttribute(int fromPosition,
int toPosition)
Moves an attribute in this node |
void |
moveNode(int fromPosition,
int toPosition)
Moves a node to a new position |
void |
removeAttribute(AntAttribute attribute)
Removes an attribute from this node |
void |
removeAttribute(int position)
Removes an attribute from this node |
void |
removeNode(AntNode node)
Removes a node from this node |
void |
removeNode(int position)
Removes a node from this node |
void |
setData(String data)
Sets the character data stored in this node |
void |
setDescription(String description)
Sets the description of this node |
void |
setIDPool(IDPool idPool)
Sets the ID pool used by this node |
void |
setName(String name)
Sets the name of this node |
void |
setNodeID(long id)
Sets the ID of this node |
void |
setParent(AntNode parent)
Sets the parent of this node |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultAntNode(int type)
type - the type of this node| Method Detail |
|---|
public void setIDPool(IDPool idPool)
setIDPool in interface AntNodeidPool - the ID pool to usepublic IDPool getIDPool()
getIDPool in interface AntNodepublic void setNodeID(long id)
setNodeID in interface AntNodeid - the ID of this nodepublic long getNodeID()
getNodeID in interface AntNodepublic String getName()
getName in interface AntNodepublic void setName(String name)
setName in interface AntNodename - the new namepublic AntNode getParent()
getParent in interface AntNodepublic void setParent(AntNode parent)
setParent in interface AntNodeparent - the new parentpublic String getDescription()
getDescription in interface AntNodepublic void setDescription(String description)
setDescription in interface AntNodedescription - the new descriptionpublic int getType()
getType in interface AntNodepublic AntAttribute getAttribute(int position)
getAttribute in interface AntNodeposition - the index of the attribute required
public AntAttribute getAttribute(String name)
getAttribute in interface AntNodename - the required attribute's name
public void moveAttribute(int fromPosition,
int toPosition)
moveAttribute in interface AntNodefromPosition - the index of the attribute to movetoPosition - the index to move the attribute topublic int indexOfAttribute(AntAttribute attribute)
indexOfAttribute in interface AntNodeattribute - the specified attribute
public void addAttribute(AntAttribute attribute,
int position)
addAttribute in interface AntNodeattribute - the attribute to addposition - the index to place the attributepublic void addAttribute(AntAttribute attribute)
addAttribute in interface AntNodeattribute - the attribute to addpublic void removeAttribute(AntAttribute attribute)
removeAttribute in interface AntNodeattribute - the attribute to removepublic void removeAttribute(int position)
removeAttribute in interface AntNodeposition - the position of the attribute to removepublic void changeAttribute(AntAttribute attribute)
changeAttribute in interface AntNodeattribute - the new version of an attributepublic AntNode getNode(int position)
getNode in interface AntNodeposition - the position of the required node
public void addNode(AntNode node,
int position)
throws CannotAddNodeException
addNode in interface AntNodenode - the node to addposition - the the index where to place the node
CannotAddNodeException - if the node is not allowed to be added
public void addNode(AntNode node)
throws CannotAddNodeException
addNode in interface AntNodenode - the node to add
CannotAddNodeException - if the node is not allowed to be addedpublic void removeNode(AntNode node)
removeNode in interface AntNodenode - the node to removepublic void removeNode(int position)
removeNode in interface AntNodeposition - the index of the node to remove
public void moveNode(int fromPosition,
int toPosition)
throws CannotAddNodeException
moveNode in interface AntNodefromPosition - the position the node is moving fromtoPosition - the position the node is moving to
CannotAddNodeException - if the node is not allowed to be addedpublic int indexOfNode(AntNode node)
indexOfNode in interface AntNodenode - the specified node
public int getTypeAt(int position)
getTypeAt in interface AntNodeposition - the index of the required node type
public boolean equals(Object obj)
equals in class Objectobj - the object to compare to
public int getAttributeSize()
getAttributeSize in interface AntNodepublic int getNodeSize()
getNodeSize in interface AntNodepublic String getData()
getData in interface AntNodepublic void setData(String data)
setData in interface AntNodedata - the new character datapublic AntNodeText getNodeText()
getNodeText in interface AntNodepublic abstract AntNode cloneNode(IDPool idPool)
cloneNode in interface AntNodeidPool - an ID pool to use
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||