|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectarchimate.util.TagNode
public class TagNode
This class implements a node of a TagTree
Constructor Summary | |
---|---|
TagNode(java.lang.String tag)
Creates a new node with the given tag |
Method Summary | |
---|---|
void |
addChild(TagNode node)
Adds a child to the node |
void |
addSource(ICodeElement code)
Adds a ICodeElement to the list of source elements. |
java.util.ArrayList<TagNode> |
children()
|
ICodeElement |
getSource(java.lang.String identifier)
Returns the source element that matches with the identifier |
boolean |
hasChild(java.lang.String tag)
Searches the nodes children for a child with a certain tag |
boolean |
hasChildren()
|
boolean |
hasParent()
Returns whether the node has a parent or not |
int |
nrOfChildren()
Returns the number of children in a node |
TagNode |
parent()
|
void |
resetVisited()
Sets the visited state to true |
void |
setParent(TagNode parent)
Sets the nodes parent |
void |
setVisited()
Sets the visited state to true |
void |
setVisited(ICodeElement element)
Marks the source element as visited. |
java.util.ArrayList<ICodeElement> |
source()
Returns the list of ICodeElement s |
java.lang.String |
tag()
|
void |
tickOffSource(java.lang.String name)
Marks the encountered source as visited |
boolean |
visited()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TagNode(java.lang.String tag)
tag
- Tag for the new nodeMethod Detail |
---|
public java.util.ArrayList<TagNode> children()
public int nrOfChildren()
public void addChild(TagNode node)
node
- The new childpublic TagNode parent()
public void setParent(TagNode parent)
parent
- The nodes parentpublic java.lang.String tag()
public boolean visited()
public void resetVisited()
public void setVisited()
public boolean hasChildren()
public boolean hasChild(java.lang.String tag)
tag
- The tag to match
public boolean hasParent()
public void addSource(ICodeElement code)
ICodeElement
to the list of source elements. If the list
contains an element with the same identifier, the element is silently
ignored.
code
- ICodeElement
that will be added to the list of source
elementspublic java.util.ArrayList<ICodeElement> source()
ICodeElement
s
ICodeElement
spublic ICodeElement getSource(java.lang.String identifier)
identifier
- the identifier to match with
public void tickOffSource(java.lang.String name)
name
- The name identifying the encountered sourcepublic void setVisited(ICodeElement element)
element
- the visited element
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |