Fixed startMoney for Nodes and Product
This commit is contained in:
parent
015d558afe
commit
b77e9a690a
@ -47,7 +47,6 @@ public class NodeFactory
|
|||||||
|
|
||||||
switch (Objects.requireNonNull(nodeType))
|
switch (Objects.requireNonNull(nodeType))
|
||||||
{
|
{
|
||||||
//TODO Money constructor
|
|
||||||
case Farmer:
|
case Farmer:
|
||||||
n = new Farmer(startMoney);
|
n = new Farmer(startMoney);
|
||||||
break;
|
break;
|
||||||
@ -66,7 +65,6 @@ public class NodeFactory
|
|||||||
}
|
}
|
||||||
|
|
||||||
String[] subs = subsChannels.split(";");
|
String[] subs = subsChannels.split(";");
|
||||||
//todo Node subscription to channels by parser data
|
|
||||||
|
|
||||||
for (String s : subs)
|
for (String s : subs)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import java.util.Random;
|
|||||||
|
|
||||||
public class Customer extends BuyerNodeBase {
|
public class Customer extends BuyerNodeBase {
|
||||||
|
|
||||||
public Customer(int startMoney) {
|
public Customer(double startMoney) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ package cz.cvut.fel.sit.omo.foodchain.node;
|
|||||||
|
|
||||||
public class Distributor extends RetailerNodeBase {
|
public class Distributor extends RetailerNodeBase {
|
||||||
|
|
||||||
public Distributor(int startMoney) {
|
public Distributor(double startMoney) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import cz.cvut.fel.sit.omo.foodchain.product.Product;
|
|||||||
|
|
||||||
public class Farmer extends SellerNodeBase {
|
public class Farmer extends SellerNodeBase {
|
||||||
|
|
||||||
public Farmer(int startMoney) {
|
public Farmer(double startMoney) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ package cz.cvut.fel.sit.omo.foodchain.node;
|
|||||||
|
|
||||||
public class Processor extends RetailerNodeBase {
|
public class Processor extends RetailerNodeBase {
|
||||||
|
|
||||||
public Processor(int startMoney) {
|
public Processor(double startMoney) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@ package cz.cvut.fel.sit.omo.foodchain.node;
|
|||||||
|
|
||||||
public class Seller extends RetailerNodeBase {
|
public class Seller extends RetailerNodeBase {
|
||||||
|
|
||||||
public Seller(int startMoney) {
|
public Seller(double startMoney) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,7 @@ public class Product
|
|||||||
this.money = Monetary.getDefaultAmountFactory().setCurrency("USD").setNumber(0).create();
|
this.money = Monetary.getDefaultAmountFactory().setCurrency("USD").setNumber(0).create();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Product(String name, ProductType productType, Double money)
|
public Product(String name, ProductType productType, double money)
|
||||||
{
|
{
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.productType = productType;
|
this.productType = productType;
|
||||||
@ -49,7 +49,7 @@ public class Product
|
|||||||
this.money = Monetary.getDefaultAmountFactory().setCurrency("USD").setNumber(0).create();
|
this.money = Monetary.getDefaultAmountFactory().setCurrency("USD").setNumber(0).create();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Product(String name, ProductType productType, ProductState productState, Double money)
|
public Product(String name, ProductType productType, ProductState productState, double money)
|
||||||
{
|
{
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.productType = productType;
|
this.productType = productType;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user