KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > internal > databinding > provisional > observable > set > SetDiff


1 /*******************************************************************************
2  * Copyright (c) 2006 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.jface.internal.databinding.provisional.observable.set;
13
14 import java.util.Set JavaDoc;
15
16 import org.eclipse.jface.internal.databinding.provisional.observable.IDiff;
17
18 /**
19  * @since 1.0
20  *
21  */

22 public abstract class SetDiff implements IDiff {
23     
24     /**
25      * @return the set of added elements
26      */

27     public abstract Set JavaDoc getAdditions();
28     
29     /**
30      * @return the set of removed elements
31      */

32     public abstract Set JavaDoc getRemovals();
33     
34     /**
35      * @see java.lang.Object#toString()
36      */

37     public String JavaDoc toString() {
38         StringBuffer JavaDoc buffer = new StringBuffer JavaDoc();
39         buffer
40             .append(getClass().getName())
41             .append("{additions [") //$NON-NLS-1$
42
.append(getAdditions() != null ? getAdditions().toString() : "null") //$NON-NLS-1$
43
.append("], removals [") //$NON-NLS-1$
44
.append(getRemovals() != null ? getRemovals().toString() : "null") //$NON-NLS-1$
45
.append("]}"); //$NON-NLS-1$
46

47         return buffer.toString();
48     }
49 }
50
Popular Tags