Class LogicBlocks<V extends LogicBlock>

    • Constructor Detail

      • LogicBlocks

        public LogicBlocks​(int connector)
      • LogicBlocks

        public LogicBlocks()
        A default constructor. You need to set the connector type before invoking execute() or this will fail.
    • Method Detail

      • setConnector

        public void setConnector​(int connector)
      • getFunctorMap

        public FunctorMap getFunctorMap()
      • doXORCase

        protected boolean doXORCase​(LogicBlock lb)
        The logical connector is excluive or. This means that the processing ends as soon as the first block is true. else -- the else result will be added to the functor map, BUT execution will stop. Invoking the XOR connector means to stop processing in this case!!!
        Parameters:
        lb -
        Returns:
      • updateFunctormap

        protected void updateFunctormap​(LogicBlock lb)
      • doORCase

        protected boolean doORCase​(LogicBlock lb)
        This will execute every logic block and take the logical OR of all the results. Each consequent will be added
        Parameters:
        lb -
        Returns:
      • doANDCase

        protected boolean doANDCase​(LogicBlock lb)
        This will execute every logic block and take logicla AND of all the results. Processing continues for all of these. Note that only in the case of XOR is processing interrupted.
        Parameters:
        lb -
        Returns:
      • clearState

        public void clearState()
        Clears each of the execution states of the logic blocks
      • isExecuted

        public boolean isExecuted()
      • getConsequents

        public List<jThen> getConsequents()
      • toJSON

        public net.sf.json.JSONObject toJSON()
        Specified by:
        toJSON in interface JSONFunctor