예제 #1
0
  /** updates an already existing object */
  public void updateObject(int par1, Object par2Obj) {
    WatchableObject watchableobject = (WatchableObject) watchedObjects.get(Integer.valueOf(par1));

    if (!par2Obj.equals(watchableobject.getObject())) {
      watchableobject.setObject(par2Obj);
      watchableobject.setWatching(true);
      objectChanged = true;
    }
  }
예제 #2
0
  public void updateWatchedObjectsFromList(List par1List) {
    Iterator iterator = par1List.iterator();

    do {
      if (!iterator.hasNext()) {
        break;
      }

      WatchableObject watchableobject = (WatchableObject) iterator.next();
      WatchableObject watchableobject1 =
          (WatchableObject) watchedObjects.get(Integer.valueOf(watchableobject.getDataValueId()));

      if (watchableobject1 != null) {
        watchableobject1.setObject(watchableobject.getObject());
      }
    } while (true);
  }