Ejemplo n.º 1
0
 /**
  * A wrapper around <code>pushInternal(Literal)</code> that checks the argument for references to
  * variables besides the one this solver is meant to process.
  *
  * @param literal the additional literal to check and then push onto the stack
  * @throws IllegalArgumentException if any variable besides the one this solver is designated for
  *     is referenced in the argument
  */
 public final void push(Literal literal) {
   if (literal.getVariable() != variable) {
     throw new IllegalArgumentException(
         "Single-variable solver for " + variable + " cannot process the literal " + literal);
   }
   pushInternal(literal);
 }