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 intcompare(MatchData m1)comparator for MatchData.booleanequals(java.lang.Object o)AssignmentgetAssignmentOne()AssignmentgetAssignmentTwo()ExchangegetExchangeOne()longgetExchangesMsValue()ExchangegetExchangeTwo()inthashCode() 
- 
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:
 hashCodein classjava.lang.Object
 - 
equals
public boolean equals(java.lang.Object o)- Overrides:
 equalsin 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"
 
 
 -