All Downloads are FREE. Search and download functionalities are using the official Maven repository.

AnnotatedTree.Processor.Condition.IsLeafNode Maven / Gradle / Ivy

package AnnotatedTree.Processor.Condition;

import AnnotatedTree.ParseNodeDrawable;

public class IsLeafNode implements NodeDrawableCondition {

    /**
     * Checks if the parse node is a leaf node, i.e., it has no child.
     * @param parseNode Parse node to check.
     * @return True if the parse node is a leaf node, false otherwise.
     */
    public boolean satisfies(ParseNodeDrawable parseNode) {
        return parseNode.numberOfChildren() == 0;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy