org.duelengine.duel.ast
Class ElementNode
java.lang.Object
org.duelengine.duel.ast.DuelNode
org.duelengine.duel.ast.ContainerNode
org.duelengine.duel.ast.ElementNode
- Direct Known Subclasses:
- CommandNode
public class ElementNode
- extends ContainerNode
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)
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.