[jboss-cvs] JBossAS SVN: r75818 - projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jul 15 00:11:24 EDT 2008
Author: flavia.rainone at jboss.com
Date: 2008-07-15 00:11:24 -0400 (Tue, 15 Jul 2008)
New Revision: 75818
Modified:
projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTAttribute.java
Log:
[JBAOP-509] Added hashCode and equals implementations to ASTAttribute.
Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTAttribute.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTAttribute.java 2008-07-15 03:13:36 UTC (rev 75817)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/ast/ASTAttribute.java 2008-07-15 04:11:24 UTC (rev 75818)
@@ -48,4 +48,25 @@
{
attribute = val;
}
+
+ @Override
+ public int hashCode()
+ {
+ return attribute + (not? 0: 1);
+ }
+
+ @Override
+ public boolean equals(Object other)
+ {
+ if (super.equals(other))
+ {
+ return true;
+ }
+ if (other instanceof ASTAttribute)
+ {
+ ASTAttribute otherAtt = (ASTAttribute) other;
+ return otherAtt.attribute == this.attribute && otherAtt.not == this.not;
+ }
+ return false;
+ }
}
More information about the jboss-cvs-commits
mailing list