You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

And.java 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* *******************************************************************
  2. * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Eclipse Public License v1.0
  6. * which accompanies this distribution and is available at
  7. * http://www.eclipse.org/legal/epl-v10.html
  8. *
  9. * Contributors:
  10. * PARC initial implementation
  11. * ******************************************************************/
  12. package org.aspectj.weaver.ast;
  13. public class And extends Test {
  14. Test left, right;
  15. public And(Test left, Test right) {
  16. super();
  17. this.left = left;
  18. this.right = right;
  19. }
  20. public void accept(ITestVisitor v) {
  21. v.visit(this);
  22. }
  23. public String toString() {
  24. return "(" + left + " && " + right + ")";
  25. }
  26. public boolean equals(Object other) {
  27. if (other instanceof And) {
  28. And o = (And) other;
  29. return o.left.equals(left) && o.right.equals(right);
  30. } else {
  31. return false;
  32. }
  33. }
  34. public Test getLeft() {
  35. return left;
  36. }
  37. public Test getRight() {
  38. return right;
  39. }
  40. }