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:
parent
0b13d54499
commit
ab89c5a46e
2 changed files with 7 additions and 4 deletions
|
@ -38,4 +38,6 @@ public interface ICDICondition {
|
|||
* @return the thread Ids for this condition.
|
||||
*/
|
||||
String[] getThreadIds();
|
||||
|
||||
boolean equals(ICDICondition cond);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue