Module dev.civl.gmc
Package dev.civl.gmc

Class FalsePredicate<S>

java.lang.Object
dev.civl.gmc.FalsePredicate<S>
Type Parameters:
S - the type used to represent states in the state-transition system
All Implemented Interfaces:
StatePredicateIF<S>

public class FalsePredicate<S> extends Object implements StatePredicateIF<S>
The state predicate which simply returns "false" at every state. This is needed in some contexts. For example, a depth-first searcher requires a predicate. If you want to search all reachable states, you can provide it a false predicate.
  • Constructor Details

    • FalsePredicate

      public FalsePredicate()
  • Method Details

    • holdsAt

      public boolean holdsAt(S state)
      Returns false.
      Specified by:
      holdsAt in interface StatePredicateIF<S>
      Parameters:
      state - any state in the state-transition system
      Returns:
      false
    • explanation

      public String explanation()
      Returns the string "The false predicate is always false."
      Specified by:
      explanation in interface StatePredicateIF<S>
      Returns:
      "The false predicate is always false."
    • toString

      public String toString()
      Returns the string "FalsePredicate".
      Overrides:
      toString in class Object