25 lines
543 B
Java
25 lines
543 B
Java
package uebung05.logistics.material;
|
|
|
|
import uebung05.logistics.quantities.IntUnit;
|
|
|
|
public class RocketPods implements IntUnit{
|
|
private static RocketPods instance;
|
|
private int amount;
|
|
|
|
private RocketPods(int amount){
|
|
this.amount = amount;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return amount + " pods of 70mm rockets";
|
|
}
|
|
|
|
public static RocketPods getInstance(int amount){
|
|
if (instance == null){
|
|
instance = new RocketPods(amount);
|
|
}
|
|
return instance;
|
|
}
|
|
}
|