16 public static class ShipSaleInfo {
17 private FleetMemberAPI member;
19 public ShipSaleInfo(FleetMemberAPI member,
float price) {
23 public FleetMemberAPI getMember() {
26 public void setMember(FleetMemberAPI member) {
29 public float getPrice() {
32 public void setPrice(
float price) {
37 public static enum LineItemType {
42 public static class TransactionLineItem {
44 private LineItemType itemType;
45 private CargoItemType cargoType;
46 private SubmarketAPI submarket;
47 private float quantity;
50 private float demandPrice;
51 private float demandTariff;
52 private long timestamp;
53 public TransactionLineItem(String
id, LineItemType itemType,
54 CargoItemType cargoType, SubmarketAPI submarket,
55 float quantity,
float price,
float tariff,
long timestamp) {
57 this.itemType = itemType;
58 this.cargoType = cargoType;
59 this.submarket = submarket;
60 this.quantity = quantity;
63 this.timestamp = timestamp;
69 public float getDemandPrice() {
72 public void setDemandPrice(
float price2) {
73 this.demandPrice = price2;
75 public float getDemandTariff() {
78 public void setDemandTariff(
float demandTariff) {
79 this.demandTariff = demandTariff;
81 public float getTariff() {
84 public void setTariff(
float tariff) {
87 public SubmarketAPI getSubmarket() {
90 public void setSubmarket(SubmarketAPI submarket) {
91 this.submarket = submarket;
93 public String getId() {
96 public void setId(String
id) {
99 public LineItemType getItemType() {
102 public void setItemType(LineItemType itemType) {
103 this.itemType = itemType;
105 public CargoItemType getCargoType() {
108 public void setCargoType(CargoItemType cargoType) {
109 this.cargoType = cargoType;
111 public float getQuantity() {
114 public void setQuantity(
float quantity) {
115 this.quantity = quantity;
117 public float getPrice() {
120 public void setPrice(
float price) {
123 public long getTimestamp() {
126 public void setTimestamp(
long timestamp) {
127 this.timestamp = timestamp;
131 private float creditValue;
135 private List<TransactionLineItem> lineItems =
new ArrayList<TransactionLineItem>();
137 private MarketAPI market;
138 private SubmarketAPI submarket;
140 private List<ShipSaleInfo> shipsBought =
new ArrayList<ShipSaleInfo>();
141 private List<ShipSaleInfo> shipsSold =
new ArrayList<ShipSaleInfo>();
142 private final CoreUITradeMode tradeMode;
145 this.market = market;
146 this.submarket = submarket;
147 this.tradeMode = tradeMode;
166 float qty = stack.getSize();
169 float val = PlayerTradeDataForSubmarket.computeImpactOfHavingAlreadyBought(market,
170 stack.getType(), stack.getData(), stack.getBaseValuePerUnit(), qty);
175 float qty = stack.getSize();
182 float val = PlayerTradeDataForSubmarket.computeImpactOfHavingAlreadySold(market,
183 stack.getType(), stack.getData(), stack.getBaseValuePerUnit(), qty);
200 this.creditValue = creditValue;
206 this.bought = bought;