package org.nfunk.jep.function;

import java.util.Stack;
import org.nfunk.jep.ParseException;

public class Not extends PostfixMathCommand {
  public void run(Stack paramStack) throws ParseException {
    checkStack(paramStack);
    Number number = (Number)paramStack.pop();
    if (number instanceof Number) {
      boolean bool = (((Number)number).doubleValue() == 0.0D) ? true : false;
      paramStack.push(new Double(bool));
    } else {
      throw new ParseException("Invalid parameter type");
    } 
  }
}
