/** * Returns true if the node is completely empty (no root, even). */ public boolean isEmpty() { return size() == 0; }
/** * Returns the specified element, or null. */ public CSTNode get( int index ) { CSTNode element = null; if( index < size() ) { element = (CSTNode)elements.get( index ); } return element; }
/** * Returns the root of the node, the Token that indicates it's * type. Returns null if there is no root (usually only if the * node is a placeholder of some kind -- see isEmpty()). */ public Token getRoot() { if( size() > 0 ) { return (Token)elements.get(0); } else { return null; } }
/** * Adds an element to the node. */ public CSTNode add( CSTNode element ) { return set( size(), element ); }
/** * Returns true if the node is completely empty (no root, even). */ public boolean isEmpty() { return size() == 0; }
/** * Returns true if the node is completely empty (no root, even). */ public boolean isEmpty() { return size() == 0; }
/** * Returns true if the node is completely empty (no root, even). */ public boolean isEmpty() { return size() == 0; }
/** * Returns true if the node is completely empty (no root, even). */ public boolean isEmpty() { return size() == 0; }
/** * Returns the specified element, or null. */ public CSTNode get( int index ) { CSTNode element = null; if( index < size() ) { element = (CSTNode)elements.get( index ); } return element; }
/** * Returns the specified element, or null. */ public CSTNode get( int index ) { CSTNode element = null; if( index < size() ) { element = (CSTNode)elements.get( index ); } return element; }
/** * Returns the specified element, or null. */ public CSTNode get( int index ) { CSTNode element = null; if( index < size() ) { element = (CSTNode)elements.get( index ); } return element; }
/** * Returns the specified element, or null. */ public CSTNode get( int index ) { CSTNode element = null; if( index < size() ) { element = (CSTNode)elements.get( index ); } return element; }
/** * Returns the root of the node, the Token that indicates it's * type. Returns null if there is no root (usually only if the * node is a placeholder of some kind -- see isEmpty()). */ public Token getRoot() { if( size() > 0 ) { return (Token)elements.get(0); } else { return null; } }
/** * Returns the root of the node, the Token that indicates it's * type. Returns null if there is no root (usually only if the * node is a placeholder of some kind -- see isEmpty()). */ public Token getRoot() { if( size() > 0 ) { return (Token)elements.get(0); } else { return null; } }
/** * Returns the root of the node, the Token that indicates it's * type. Returns null if there is no root (usually only if the * node is a placeholder of some kind -- see isEmpty()). */ public Token getRoot() { if( size() > 0 ) { return (Token)elements.get(0); } else { return null; } }
/** * Returns the root of the node, the Token that indicates it's * type. Returns null if there is no root (usually only if the * node is a placeholder of some kind -- see isEmpty()). */ public Token getRoot() { if( size() > 0 ) { return (Token)elements.get(0); } else { return null; } }
/** * Adds an element to the node. */ public CSTNode add( CSTNode element ) { return set( size(), element ); }
/** * Adds an element to the node. */ public CSTNode add( CSTNode element ) { return set( size(), element ); }
/** * Adds an element to the node. */ public CSTNode add( CSTNode element ) { return set( size(), element ); }
/** * Adds an element to the node. */ public CSTNode add( CSTNode element ) { return set( size(), element ); }