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

Constructors
Constructor | Description
--- | ---
`MatchData​(Exchange exchangeOne, Exchange exchangeTwo)` | create MatchData

## 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()` |

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MatchData

public MatchData​(Exchange exchangeOne, Exchange exchangeTwo)
create MatchData

Parameters:
  `exchangeOne` - first Exchange of found match
  `exchangeTwo` - second Exchange of found match

## Method Details

### getExchangeOne

public Exchange getExchangeOne()

Returns:
  first Exchange

### getExchangeTwo

public Exchange getExchangeTwo()

Returns:
  second Exchange

### getAssignmentTwo

public Assignment getAssignmentTwo()

Returns:
  second Exchange's owned assignmetn

### getAssignmentOne

public Assignment getAssignmentOne()

Returns:
  first Exchange's owned assignmetn

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`

### equals

public boolean equals​(java.lang.Object o)

Overrides:
  `equals` in class `java.lang.Object`

### compare

public int compare​(MatchData m1)
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"