예제 #1
0
 /**
  * remove entityId from container. ???? time is not used ?????
  *
  * @param entityId
  * @param time not used
  * @return true, when successful
  * @throws ModelException
  */
 public boolean removeFromContainer(String entityId, long time) throws ModelException {
   boolean out;
   Entity e = model.getEntities().get(entityId);
   out = (e != null) && (this.container.containsKey(entityId));
   if (out) {
     this.container.remove(entityId);
   }
   return out;
 }
예제 #2
0
 /**
  * add an entity value with id entityId in to container
  *
  * @param entityId
  * @param value
  * @return true, when successful
  */
 public boolean addToContainer(String entityId, E value) {
   boolean out;
   Entity e = model.getEntities().get(entityId);
   out = (e != null) && e.isFree();
   if (out) {
     this.container.put(entityId, value);
   }
   return out;
 }
예제 #3
0
 /**
  * check if it contains a entity with entityId
  *
  * @param entityId
  * @return true, when successful
  */
 public boolean containsInContainer(String entityId) {
   boolean out;
   Entity e = model.getEntities().get(entityId);
   out = (e != null) && (this.container.containsKey(entityId));
   return out;
 }