Exemplo n.º 1
0
 public void setValue(Value value) {
   if (canContainValue(value)) this.value = value;
   else
     throw new RuntimeException(
         "Box " + this + " cannot contain value: " + value + "(" + value.getClass() + ")");
 }