KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > databinding > observable > set > SetDiff


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.set;
13
14 import java.util.Set JavaDoc;
15
16 /**
17  * @since 1.0
18  *
19  */

20 public abstract class SetDiff {
21     
22     /**
23      * @return the set of added elements
24      */

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

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

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

45         return buffer.toString();
46     }
47 }
48
Popular Tags