示例#1
0
 /**
  * Have the attribute be bound to the value of the symbol at model instantiation.
  *
  * @param value the value
  */
 public void setRequestsReceived(jprime.variable.SymbolVariable value) {
   if (value == null) throw new RuntimeException("attr was null");
   if (value.getDBName() != -1)
     throw new RuntimeException("the attr was already attached to another model node!");
   value.attachToNode(this, jprime.gen.ModelNodeVariable.requests_received());
   addAttr(value);
 }
示例#2
0
 /**
  * Set the attribute to the static value 'value'.
  *
  * @param value the value
  */
 public void setRequestsReceived(long value) {
   jprime.variable.ModelNodeVariable temp =
       getAttributeByName(jprime.gen.ModelNodeVariable.requests_received());
   if (temp == null) {
     temp =
         new jprime.variable.IntegerVariable(
             jprime.gen.ModelNodeVariable.requests_received(), value);
     addAttr(temp);
   } else {
     if (!(temp instanceof jprime.variable.IntegerVariable)) {
       temp =
           new jprime.variable.IntegerVariable(
               jprime.gen.ModelNodeVariable.requests_received(), value);
       addAttr(temp);
     } else {
       ((jprime.variable.IntegerVariable) temp).setValue(value);
     }
   }
 }