Package com.helger.css.parser
Class CSSNode
java.lang.Object
com.helger.css.parser.CSSNode
- All Implemented Interfaces:
com.helger.commons.collection.impl.ICommonsIterable<CSSNode>,com.helger.commons.traits.IGetterDirectTrait,Node,Serializable,Iterable<CSSNode>
public class CSSNode
extends Object
implements Node, com.helger.commons.collection.impl.ICommonsIterable<CSSNode>, com.helger.commons.traits.IGetterDirectTrait
This class represents a simple node in the tree built by jjtree. It's a
customized version of the default JJTree Node.
- Author:
- Philip Helger
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendText(String sText) voidintgetId()intgetText()getValue()booleanhasText()iterator()voidjjtAddChild(Node aNode, int nIndex) Called from the highest index to the lowest index!voidjjtClose()This method is called after all the child nodes have been added.jjtGetChild(int nIndex) This method returns a child node.intvoidjjtOpen()This method is called after the node has been made the current node.voidjjtSetFirstToken(Token aFirstToken) voidjjtSetLastToken(Token aLastToken) voidjjtSetParent(Node aNode) Set the parent node of this nodevoidvoidtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.commons.collection.impl.ICommonsIterable
containsAny, containsNone, containsOnly, findAll, findAllInstanceOf, findAllMapped, findAllMapped, findAllMapped, findFirst, findFirst, findFirstIndex, findFirstMapped, findFirstMapped, findLastIndex, forEachBreakable, forEachByIndex, forEachThrowing, getCount, getCountMethods inherited from interface com.helger.commons.traits.IGetterDirectTrait
getAsBigDecimal, getAsBigDecimal, getAsBigInteger, getAsBigInteger, getAsBoolean, getAsBoolean, getAsBooleanObj, getAsByte, getAsByte, getAsByteArray, getAsByteObj, getAsChar, getAsChar, getAsCharArray, getAsCharArray, getAsCharObj, getAsDouble, getAsDouble, getAsDoubleObj, getAsFloat, getAsFloat, getAsFloatObj, getAsInt, getAsInt, getAsIntObj, getAsLocalDate, getAsLocalDate, getAsLocalDateTime, getAsLocalDateTime, getAsLocalTime, getAsLocalTime, getAsLong, getAsLong, getAsLongObj, getAsShort, getAsShort, getAsShortObj, getAsSqlBlob, getAsSqlClob, getAsSqlDate, getAsSqlNClob, getAsSqlRowId, getAsSqlTime, getAsSqlTimestamp, getAsString, getAsString, getCastedValue, getCastedValue, getCastedValue, getCastedValue, getConvertedValue, getConvertedValue, getValueClass, hasNoValue, hasValueMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
CSSNode
public CSSNode(int nType)
-
-
Method Details
-
getId
public int getId() -
jjtOpen
public void jjtOpen()Description copied from interface:NodeThis method is called after the node has been made the current node. It indicates that child nodes can now be added to it. -
jjtClose
public void jjtClose()Description copied from interface:NodeThis method is called after all the child nodes have been added. -
jjtSetParent
Description copied from interface:NodeSet the parent node of this node- Specified by:
jjtSetParentin interfaceNode- Parameters:
aNode- parent node to set
-
jjtGetParent
- Specified by:
jjtGetParentin interfaceNode- Returns:
- parent node
-
jjtAddChild
Called from the highest index to the lowest index!- Specified by:
jjtAddChildin interfaceNode- Parameters:
aNode- node to add as a childnIndex- zero-based index where to add the child
-
jjtGetChild
Description copied from interface:NodeThis method returns a child node. The children are numbered from zero, left to right.- Specified by:
jjtGetChildin interfaceNode- Parameters:
nIndex- zero-baeed child index
-
jjtGetNumChildren
- Specified by:
jjtGetNumChildrenin interfaceNode- Returns:
- the number of children the node has. Always ≥ 0.
-
jjtGetFirstToken
-
jjtSetFirstToken
-
jjtGetLastToken
-
jjtSetLastToken
-
setValue
-
getValue
- Specified by:
getValuein interfacecom.helger.commons.traits.IGetterDirectTrait
-
setText
-
appendText
-
getText
-
hasText
public boolean hasText() -
getNodeType
public int getNodeType() -
iterator
-
getSourceLocation
- Returns:
- The source location of this node. May be
nullif neither begin token nor end token is present.
-
dump
-
toString
-