View Javadoc
1   package org.opentrafficsim.water.transfer;
2   
3   public class TerminalPortTax
4   {
5   
6       private double feePortPerFullMove;
7   
8       private double feePortPerEmptyMove;
9   
10      private double feePortPerShipDWT;
11  
12      private String feeStrategy;
13  
14      private boolean usePortFeePerFullMove;
15  
16      private boolean usePortFeePerEmptyMove;
17  
18      private boolean usePortFeePerShipDWT;
19  
20      public TerminalPortTax(double feePortPerFullMove, double feePortPerEmptyMove, double feePortPerDWT, String feeStrategy)
21      {
22  
23          this.feePortPerFullMove = feePortPerFullMove;
24          this.feePortPerEmptyMove = feePortPerEmptyMove;
25          this.feePortPerShipDWT = feePortPerDWT;
26          this.feeStrategy = feeStrategy;
27  
28          if ("F".equals(feeStrategy))
29          {
30              this.usePortFeePerFullMove = true;
31              this.usePortFeePerEmptyMove = false;
32              this.usePortFeePerShipDWT = false;
33  
34          }
35          if ("A".equals(feeStrategy))
36          {
37              this.usePortFeePerFullMove = true;
38              this.usePortFeePerEmptyMove = true;
39              this.usePortFeePerShipDWT = false;
40  
41          }
42          if ("S".equals(feeStrategy))
43          {
44              this.usePortFeePerFullMove = false;
45              this.usePortFeePerEmptyMove = false;
46              this.usePortFeePerShipDWT = true;
47  
48          }
49      }
50  
51      public double getFeePortPerShipDWT()
52      {
53  
54          return feePortPerShipDWT;
55      }
56  
57      public double getFeePortPerFullMove()
58      {
59          return feePortPerFullMove;
60      }
61  
62      public double getFeePortPerEmptyMove()
63      {
64          return feePortPerEmptyMove;
65      }
66  
67      public boolean isUsePortFeePerEmptyMove()
68      {
69          return usePortFeePerEmptyMove;
70      }
71  
72      public boolean isUsePortFeePerFullMove()
73      {
74          return usePortFeePerFullMove;
75      }
76  
77      public boolean isUsePortFeePerShipDWT()
78      {
79          return usePortFeePerShipDWT;
80      }
81  
82      public String getFeeStrategy()
83      {
84          return feeStrategy;
85      }
86  }