comparison org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetDiff.d @ 95:6208d4f6a277

Added trees for databinding.beans and observable
author Frank Benoit <benoit@tionex.de>
date Tue, 21 Apr 2009 10:55:51 +0200
parents
children b74ac5dfcc06
comparison
equal deleted inserted replaced
94:1d37a7813832 95:6208d4f6a277
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;
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 getAdditions();
26
27 /**
28 * @return the set of removed elements
29 */
30 public abstract Set getRemovals();
31
32 /**
33 * @see java.lang.Object#toString()
34 */
35 public String toString() {
36 StringBuffer buffer = new StringBuffer();
37 buffer
38 .append(getClass().getName())
39 .append("{additions [") //$NON-NLS-1$
40 .append(getAdditions() !is null ? getAdditions().toString() : "null") //$NON-NLS-1$
41 .append("], removals [") //$NON-NLS-1$
42 .append(getRemovals() !is null ? getRemovals().toString() : "null") //$NON-NLS-1$
43 .append("]}"); //$NON-NLS-1$
44
45 return buffer.toString();
46 }
47 }