mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
Implemented the "equals' method of the "Condition" class.
This commit is contained in:
parent
44e45fb15f
commit
3d578e42da
2 changed files with 25 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2004-11-12 Mikhail Khodjaiants
|
||||
Implemented the "equals' method of the "Condition" class.
|
||||
* cdi/org/eclipse/cdt/debug/mi/core/cdi/Condition.java
|
||||
|
||||
2004-11-12 Alain Magloire
|
||||
Fix for PR 78488
|
||||
* mi/org/eclipse/cdt/debug/mi/core/command/MICommand.java
|
||||
|
|
|
@ -46,4 +46,25 @@ public class Condition implements ICDICondition {
|
|||
public String[] getThreadIds() {
|
||||
return tids;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
public boolean equals( Object obj ) {
|
||||
if (obj instanceof ICDICondition) {
|
||||
ICDICondition cond = (ICDICondition)obj;
|
||||
if (cond.getIgnoreCount() != this.getIgnoreCount())
|
||||
return false;
|
||||
if (cond.getExpression().compareTo(this.getExpression()) != 0)
|
||||
return false;
|
||||
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)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue