Documentation of 'jhpro.dtree.BinTree' Java class
BinTree
jhpro.dtree

Class BinTree

  • All Implemented Interfaces:
    java.io.Serializable


    public class BinTree
    extends java.lang.Object
    implements java.io.Serializable
    Represents a single node with decision (or answer).
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      BinTree(int newNodeID, java.lang.String newQuestAns)
      Represents a single node with decision (or answer).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getNodeAnswer()
      Get the answer.
      java.lang.String toString()
      Print to the string.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • nodeID

        public int nodeID
      • questOrAns

        public java.lang.String questOrAns
      • yesBranch

        public BinTree yesBranch
      • noBranch

        public BinTree noBranch
    • Constructor Detail

      • BinTree

        public BinTree(int newNodeID,
                       java.lang.String newQuestAns)
        Represents a single node with decision (or answer).
        Parameters:
        newNodeID - node ID
        newQuestAnser - answer
    • Method Detail

      • toString

        public java.lang.String toString()
        Print to the string.
        Overrides:
        toString in class java.lang.Object
      • getNodeAnswer

        public int getNodeAnswer()
        Get the answer. If tree is not ready, it returns -1.
        Returns:
        -1 if tree not ready, or node ID if tree is ready for answer.

DMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.