KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > databinding > observable > map > MapDiff


1 /*******************************************************************************
2  * Copyright (c) 2006, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.core.databinding.observable.map;
13
14 import java.util.Set JavaDoc;
15
16 /**
17  * @since 1.1
18  *
19  */

20 public abstract class MapDiff {
21
22     /**
23      * @return the set of keys which were added
24      */

25     public abstract Set JavaDoc getAddedKeys();
26
27     /**
28      * @return the set of keys which were removed
29      */

30     public abstract Set JavaDoc getRemovedKeys();
31
32     /**
33      * @return the set of keys for which the value has changed
34      */

35     public abstract Set JavaDoc getChangedKeys();
36
37     /**
38      * Returns the old value for the given key, which must be an element of
39      * {@link #getRemovedKeys()} or {@link #getChangedKeys()}.
40      *
41      * @param key
42      * @return the old value for the given key.
43      */

44     public abstract Object JavaDoc getOldValue(Object JavaDoc key);
45
46     /**
47      * Returns the new value for the given key, which must be an element of
48      * {@link #getChangedKeys()} or {@link #getAddedKeys()}.
49      *
50      * @param key
51      * @return the new value for the given key.
52      */

53     public abstract Object JavaDoc getNewValue(Object JavaDoc key);
54 }
55
Popular Tags