1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

define equals(ICDICondition)

This commit is contained in:
Alain Magloire 2004-11-12 20:33:09 +00:00
parent 0b13d54499
commit ab89c5a46e
2 changed files with 7 additions and 4 deletions

View file

@ -38,4 +38,6 @@ public interface ICDICondition {
* @return the thread Ids for this condition.
*/
String[] getThreadIds();
boolean equals(ICDICondition cond);
}

View file

@ -50,9 +50,9 @@ public class Condition implements ICDICondition {
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals( Object obj ) {
if (obj instanceof ICDICondition) {
ICDICondition cond = (ICDICondition)obj;
public boolean equals(ICDICondition obj) {
if (obj instanceof Condition) {
Condition cond = (Condition)obj;
if (cond.getIgnoreCount() != this.getIgnoreCount())
return false;
if (cond.getExpression().compareTo(this.getExpression()) != 0)
@ -60,8 +60,9 @@ public class Condition implements ICDICondition {
if (cond.getThreadIds().length != this.getThreadIds().length)
return false;
for (int i = 0; i < cond.getThreadIds().length; ++i) {
if ( cond.getThreadIds()[i].compareTo(this.getThreadIds()[i]) != 0)
if (cond.getThreadIds()[i].compareTo(this.getThreadIds()[i]) != 0) {
return false;
}
}
return true;
}