Checkpoint: ExchangeServiceTest
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
package com.plannaplan.models;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
|
||||
import com.plannaplan.entities.Assignment;
|
||||
import com.plannaplan.entities.Exchange;
|
||||
|
||||
@ -55,4 +57,12 @@ public class MatchData {
|
||||
// Compare the data members and return accordingly
|
||||
return (this.getAssignmentOne().equals(c.getAssignmentOne()) && this.getAssignmentTwo().equals(c.getAssignmentTwo())) || (this.getAssignmentOne().equals(c.getAssignmentTwo()) && this.getAssignmentTwo().equals(c.getAssignmentOne()));
|
||||
}
|
||||
|
||||
public int compare(MatchData m1) {
|
||||
return Float.compare(m1.getExchangesMsValue(), this.getExchangesMsValue());
|
||||
}
|
||||
|
||||
public float getExchangesMsValue(){
|
||||
return this.exchangeOne.getDataExchange().getTime() + this.exchangeTwo.getDataExchange().getTime();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user