Examples of MapDiff


Examples of org.eclipse.core.databinding.observable.map.MapDiff

   * @param newValue
   * @return a map diff
   */
  public static MapDiff createMapDiffSingleChange(final Object existingKey,
      final Object oldValue, final Object newValue) {
    return new MapDiff() {

      public Set getAddedKeys() {
        return Collections.EMPTY_SET;
      }

View Full Code Here

Examples of org.eclipse.core.databinding.observable.map.MapDiff

   * @param oldValue
   * @return a map diff
   */
  public static MapDiff createMapDiffSingleRemove(final Object removedKey,
      final Object oldValue) {
    return new MapDiff() {

      public Set getAddedKeys() {
        return Collections.EMPTY_SET;
      }

View Full Code Here

Examples of org.eclipse.core.databinding.observable.map.MapDiff

  /**
   * @param copyOfOldMap
   * @return a map diff
   */
  public static MapDiff createMapDiffRemoveAll(final Map copyOfOldMap) {
    return new MapDiff() {

      public Set getAddedKeys() {
        return Collections.EMPTY_SET;
      }

View Full Code Here

Examples of org.eclipse.core.databinding.observable.map.MapDiff

   * @return a map diff
   */
  public static MapDiff createMapDiff(final Set addedKeys,
      final Set removedKeys, final Set changedKeys, final Map oldValues,
      final Map newValues) {
    return new MapDiff() {

      public Set getAddedKeys() {
        return addedKeys;
      }

View Full Code Here

Examples of org.eclipse.core.databinding.observable.map.MapDiff

      if (!Util.equals(oldValue, newValue)
          || staleMasterValues.contains(masterValue)) {
        cachedValues.put(masterValue, newValue);
        staleMasterValues.remove(masterValue);
        fireMapChange(new MapDiff() {
          public Set getAddedKeys() {
            return Collections.EMPTY_SET;
          }

          public Set getChangedKeys() {
View Full Code Here

Examples of org.eclipse.core.databinding.observable.map.MapDiff

    boolean add = !map.containsKey(key);

    Object oldValue = map.get(key);

    MapDiff diff;
    if (add)
      diff = Diffs.createMapDiffSingleAdd(key, value);
    else
      diff = Diffs.createMapDiffSingleChange(key, oldValue, value);
View Full Code Here

Examples of org.eclipse.core.databinding.observable.map.MapDiff

        addedKeys.add(key);
      }
      newValues.put(key, newValue);
    }

    MapDiff diff = Diffs.createMapDiff(addedKeys, Collections.EMPTY_SET,
        changedKeys, oldValues, newValues);
    updateMap(map, diff);
  }
View Full Code Here

Examples of org.eclipse.core.databinding.observable.map.MapDiff

    if (!map.containsKey(key))
      return null;

    Object oldValue = map.get(key);

    MapDiff diff = Diffs.createMapDiffSingleRemove(key, oldValue);
    updateMap(map, diff);

    return oldValue;
  }
View Full Code Here

Examples of org.eclipse.core.databinding.observable.map.MapDiff

    Map map = getMap();
    if (map.isEmpty())
      return;

    MapDiff diff = Diffs.createMapDiffRemoveAll(new HashMap(map));
    updateMap(map, diff);
  }
View Full Code Here

Examples of org.eclipse.core.databinding.observable.map.MapDiff

    public void remove() {
      getterCalled();
      checkForComodification();

      MapDiff diff = Diffs.createMapDiffSingleRemove(last.getKey(),
          last.getValue());
      updateMap(map, diff);

      iterator.remove(); // stay in sync
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.