示例#1
0
 /**
  * Update the property so the value is current.
  *
  * @param pm PropertyMaps used for substitution when replacing variables
  */
 public void update(PropertyMaps pm) {
   P op;
   if (_attributes.get(_op1Name) == null) {
     _value = "(" + _name + " Error...)";
     return;
   } else {
     try {
       op = _parse.value(_attributes.get(_op1Name));
     } catch (Exception e) {
       _value = "(" + _name + " Error...)";
       return;
     }
   }
   _value = _format.value(_op.value(op));
 }
 /**
  * Apply the given command to the specified region to change it.
  *
  * @param region the region to find and change
  * @param cmd command that mutates the region.
  */
 public void changeRegion(final R region, Lambda<R, Object> cmd) {
   cmd.value(region);
   // notify
   _lock.startRead();
   try {
     for (RegionManagerListener<R> l : _listeners) {
       l.regionChanged(region);
     }
   } finally {
     _lock.endRead();
   }
 }