source: geniuswebcore/geniusweb/actions/ActionWithBid.py@ 72

Last change on this file since 72 was 72, checked in by Bart Vastenhouw, 3 years ago

Reduced memory need of websockets.

File size: 866 bytes
RevLine 
[72]1from typing import Dict, Any
2from geniusweb.actions.AbstractAction import AbstractAction
3from geniusweb.actions.PartyId import PartyId
4from geniusweb.issuevalue.Bid import Bid
5
6
7class ActionWithBid ( AbstractAction ):
8 '''
9 An {@link Action} containing a bid. Note that the presense of a bid does not
10 necessarily mean that an offer was placed for this bid.
11
12 '''
13
14 def __init__(self, actor:PartyId, bid:Bid):
15 '''
16 @param param the actor partyid:
17 @param bid the bid. FIXME use Bid object and strong typing
18 '''
19 super().__init__(actor)
20 self._bid = bid
21
22 def getBid(self) -> Bid:
23 '''
24 @return the {@link Bid} that this action is about.
25 '''
26 return self._bid;
27
28 def __eq__(self, other):
29 return isinstance(other, self.__class__) and \
30 super().__eq__(other) and self._bid==other._bid
31
32 def __hash__(self):
33 return hash((self._actor, self._bid))
34
Note: See TracBrowser for help on using the repository browser.