Last change
on this file since 73 was 73, checked in by Bart Vastenhouw, 3 years ago |
Fix for IssueValue hashcode.
|
File size:
842 bytes
|
Rev | Line | |
---|
[73] | 1 | from geniusweb.inform.Agreements import Agreements
|
---|
| 2 | from geniusweb.inform.Inform import Inform
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | class Finished (Inform):
|
---|
| 6 | '''
|
---|
| 7 | Informs that the session is finished, and also contains the bid that was
|
---|
| 8 | agreed on.
|
---|
| 9 |
|
---|
| 10 | '''
|
---|
| 11 |
|
---|
| 12 | def __init__(self, agreements:Agreements ):
|
---|
| 13 | '''
|
---|
| 14 | The session finished (can be for any reason).
|
---|
| 15 |
|
---|
| 16 | @param agreements the {@link Agreements} that were finally agreed on.
|
---|
| 17 |
|
---|
| 18 | '''
|
---|
| 19 | if not agreements:
|
---|
| 20 | raise ValueError("Agreements must be not None")
|
---|
| 21 | self._agreements = agreements;
|
---|
| 22 |
|
---|
| 23 | def getAgreements(self) -> Agreements :
|
---|
| 24 | return self._agreements;
|
---|
| 25 |
|
---|
| 26 |
|
---|
| 27 | def __repr__(self):
|
---|
| 28 | return "Finished["+str(self._agreements)+"]"
|
---|
| 29 |
|
---|
| 30 |
|
---|
| 31 | def __eq__(self, other):
|
---|
| 32 | return isinstance(other, self.__class__) and super().__eq__(other) \
|
---|
| 33 | and self._agreements == other._agreements
|
---|
| 34 |
|
---|
| 35 | def __hash__(self):
|
---|
| 36 | return hash(self._agreements) |
---|
Note:
See
TracBrowser
for help on using the repository browser.