Package com.plannaplan.models
Class MatchData
java.lang.Object
com.plannaplan.models.MatchData
public class MatchData
extends java.lang.Object
Match of users Exchange's to be performed
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description int
compare(MatchData m1)
comparator for MatchData.boolean
equals(java.lang.Object o)
Assignment
getAssignmentOne()
Assignment
getAssignmentTwo()
Exchange
getExchangeOne()
long
getExchangesMsValue()
Exchange
getExchangeTwo()
int
hashCode()
-
Constructor Details
-
MatchData
create MatchData- Parameters:
exchangeOne
- first Exchange of found matchexchangeTwo
- second Exchange of found match
-
-
Method Details
-
getExchangeOne
- Returns:
- first Exchange
-
getExchangeTwo
- Returns:
- second Exchange
-
getAssignmentTwo
- Returns:
- second Exchange's owned assignmetn
-
getAssignmentOne
- Returns:
- first Exchange's owned assignmetn
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equals
in classjava.lang.Object
-
compare
comparator for MatchData. It compare it by sum of both exchange's times. For example MatchData with Exchanges 11:00 and 12:00 will be less than with Exchanges 12:00 and 12:00- Parameters:
m1
- MatchData instance to compare to- Returns:
- int less than 0 if m1 is "less than", 0 if it's equal and more than 0 otherwise
-
getExchangesMsValue
public long getExchangesMsValue()- Returns:
- sum of both exchanges java.sql.Timestanp::getTime"
-