org.duelengine.duel.ast
Class ElementNode

java.lang.Object
  extended by org.duelengine.duel.ast.DuelNode
      extended by org.duelengine.duel.ast.ContainerNode
          extended by org.duelengine.duel.ast.ElementNode
Direct Known Subclasses:
CommandNode

public class ElementNode
extends ContainerNode


Constructor Summary
ElementNode(String name)
           
ElementNode(String name, AttributePair[] attr, DuelNode... children)
           
ElementNode(String name, int index, int line, int column)
           
 
Method Summary
 void addAttribute(AttributePair attr)
           
 boolean canHaveChildren()
           
 void clearAttributes()
           
 boolean equals(Object arg)
           
 DuelNode getAttribute(String name)
           
 Set<String> getAttributeNames()
           
 String getTagName()
           
 boolean hasAttributes()
           
 int hashCode()
           
 boolean isAncestor(String tag)
           
 boolean isAncestorOrSelf(String tag)
           
 boolean isBoolAttribute(String name)
           
 boolean isLinkAttribute(String name)
           
 boolean isSelf(String tag)
           
protected  String mapAttrName(String name)
          Maps the human-entered attribute to output command
 DuelNode removeAttribute(String name)
           
 void setAttribute(String name, DuelNode value)
           
 
Methods inherited from class org.duelengine.duel.ast.ContainerNode
appendChild, childCount, getChildren, getFirstChild, getLastChild, hasChildren, removeChild, replaceChild, toString
 
Methods inherited from class org.duelengine.duel.ast.DuelNode
getColumn, getIndex, getLine, getParent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ElementNode

public ElementNode(String name,
                   int index,
                   int line,
                   int column)

ElementNode

public ElementNode(String name)

ElementNode

public ElementNode(String name,
                   AttributePair[] attr,
                   DuelNode... children)
Method Detail

getTagName

public String getTagName()

canHaveChildren

public boolean canHaveChildren()

isLinkAttribute

public boolean isLinkAttribute(String name)

isBoolAttribute

public boolean isBoolAttribute(String name)

hasAttributes

public boolean hasAttributes()

getAttributeNames

public Set<String> getAttributeNames()

addAttribute

public void addAttribute(AttributePair attr)
                  throws NullPointerException
Throws:
NullPointerException

getAttribute

public DuelNode getAttribute(String name)

setAttribute

public void setAttribute(String name,
                         DuelNode value)

removeAttribute

public DuelNode removeAttribute(String name)

clearAttributes

public void clearAttributes()

isSelf

public boolean isSelf(String tag)

isAncestor

public boolean isAncestor(String tag)

isAncestorOrSelf

public boolean isAncestorOrSelf(String tag)

mapAttrName

protected String mapAttrName(String name)
Maps the human-entered attribute to output command

Parameters:
name -
Returns:

equals

public boolean equals(Object arg)
Overrides:
equals in class ContainerNode

hashCode

public int hashCode()
Overrides:
hashCode in class ContainerNode


Copyright © 2012. All Rights Reserved.