Class Leaf

  • Direct Known Subclasses:
    Branch

    public abstract class Leaf
    extends java.lang.Object
    Base leaf of the framework, abstract class to be extended on for behavior functionality
    • Constructor Detail

      • Leaf

        public Leaf()
    • Method Detail

      • isValid

        public abstract boolean isValid()
        Boolean to check if this leaf should be run or not Implementation required
        Returns:
        true if it should be run, else false
      • onLoop

        public abstract int onLoop()
        Main execution method for the leaf Implementation required
        Returns:
        < 0 if you want script to stop, otherwise script sleeps for return value
      • getTree

        public TreeScript getTree()
        Gets the TreeScript parent of this Leaf
        Returns:
        Tree parent of this leaf
      • getParent

        public Branch getParent()
      • setParent

        public void setParent​(Branch parent)