public class XORAllocation<T extends Good> extends Object implements Allocation<BidderAllocation<T>>
| Constructor and Description |
|---|
XORAllocation(Map<Bidder<T>,BidderAllocation<T>> trades) |
| Modifier and Type | Method and Description |
|---|---|
BidderAllocation<T> |
getAllocation(Bidder<?> bidder)
Returns information about the goods allocated to a specific bidder
|
Collection<? extends Bidder<?>> |
getBidders() |
double |
getTotalAllocationValue() |
BigDecimal |
getTotalValue() |
Collection<BidderAllocation<T>> |
getTrades() |
Map<Bidder<T>,BidderAllocation<T>> |
getTradesMap()
The Map only includes winning bidders
|
Set<Bidder<T>> |
getWinners() |
boolean |
isWinner(Bidder bidder) |
String |
toString() |
BidderAllocation |
tradeOf(Bidder bidder)
Deprecated.
|
public XORAllocation(Map<Bidder<T>,BidderAllocation<T>> trades)
trades - map of winning bidders to allocationspublic double getTotalAllocationValue()
public Collection<BidderAllocation<T>> getTrades()
public Map<Bidder<T>,BidderAllocation<T>> getTradesMap()
public boolean isWinner(Bidder bidder)
@Deprecated public BidderAllocation tradeOf(Bidder bidder)
public Collection<? extends Bidder<?>> getBidders()
getBidders in interface Allocation<BidderAllocation<T extends Good>>public BidderAllocation<T> getAllocation(Bidder<?> bidder)
AllocationgetAllocation in interface Allocation<BidderAllocation<T extends Good>>public BigDecimal getTotalValue()
getTotalValue in interface Allocation<BidderAllocation<T extends Good>>Copyright © 2018. All rights reserved.