public boolean isOutputDock() { return !dockDescription.isInputDock(); }
+ public BitVector getConstant(String constantName) {
+ BitVector bv = dockDescription.getConstant(constantName);
+ if (bv==null)
+ throw new RuntimeException("unknown constant \""+constantName+"\" on dock " + this);
+ return bv;
+ }
}
}
throw new RuntimeException("inconsistency: Ship does not belong to its own Fleet!");
}
+
+ public BitVector getConstant(String constantName) {
+ BitVector bv = shipDescription.getConstant(constantName);
+ if (bv==null)
+ throw new RuntimeException("unknown constant \""+constantName+"\" on ship " + this);
+ return bv;
+ }
}
public BitVector getConstant(String name) {
BitVector c = constants.get(name);
- if (c==null)
- throw new RuntimeException("unknown constant " + name);
+ if (c==null) throw new RuntimeException("unknown constant " + name);
return c;
}