1
package ca.ubc.cs.spl.aspectPatterns.examples.interpreter.aspectj;
3
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
5
* This file is part of the design patterns project at UBC
7
* The contents of this file are subject to the Mozilla Public License
8
* Version 1.1 (the "License"); you may not use this file except in
9
* compliance with the License. You may obtain a copy of the License at
10
* either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/.
12
* Software distributed under the License is distributed on an "AS IS" basis,
13
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14
* for the specific language governing rights and limitations under the
17
* The Original Code is ca.ubc.cs.spl.aspectPatterns.
19
* For more details and the latest version of this code, please see:
20
* http://www.cs.ubc.ca/labs/spl/projects/aodps.html
26
* Implements negation for booleans expressions. This is a concrete boolean
27
* <i>NonterminalExpression</i>
29
* @author Jan Hannemann
30
* @author Gregor Kiczales
31
* @version 1.1, 02/11/04
34
public class NotExpression implements BooleanExpression {
37
* the <i>Expression</i> this <i>Expression</i> negates
40
protected BooleanExpression exp = null;
43
* Creates a new NOT <i>Expression</i> negating the argument expression
45
* @param exp the <i>Expression</i> to negate
48
public NotExpression(BooleanExpression exp) {
53
* Evaluates this <i>Expression</i> in the given
56
* @param c the context to evaluate the <i>Expression</i> in
57
* @return the boolean value of the <i>Expression</i>
60
public boolean evaluate(VariableContext c) {
61
return (! exp.evaluate(c));
b'\\ No newline at end of file'