예제 #1
0
  /**
   * Sets the screens containing the plate.
   *
   * @param value The set of screens.
   */
  public void setScreens(Set<ScreenData> value) {
    Set<ScreenData> currentValue = getScreens();
    SetMutator<ScreenData> m = new SetMutator<ScreenData>(currentValue, value);

    while (m.moreDeletions()) {
      setDirty(true);
      asPlate().unlinkScreen(m.nextDeletion().asScreen());
    }

    while (m.moreAdditions()) {
      setDirty(true);
      asPlate().linkScreen(m.nextAddition().asScreen());
    }

    screens = new HashSet<ScreenData>(m.result());
  }
예제 #2
0
  /**
   * Sets the experimenters contained in this group.
   *
   * @param newValue The set of experimenters.
   */
  public void setExperimenters(Set<ExperimenterData> newValue) {
    Set<ExperimenterData> currentValue = getExperimenters();
    SetMutator<ExperimenterData> m = new SetMutator<ExperimenterData>(currentValue, newValue);

    while (m.moreDeletions()) {
      setDirty(true);
      asGroup().unlinkExperimenter(m.nextDeletion().asExperimenter());
    }

    while (m.moreAdditions()) {
      setDirty(true);
      asGroup().linkExperimenter(m.nextAddition().asExperimenter());
    }

    experimenters = new HashSet<ExperimenterData>(m.result());
  }