78
|
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 module org.eclipse.core.databinding.observable.set.SetDiff;
|
|
13
|
|
14 import java.lang.all;
|
85
|
15 import java.nonstandard.RuntimeTraits;
|
78
|
16
|
|
17 import java.util.Set;
|
|
18
|
|
19 /**
|
|
20 * @since 1.0
|
|
21 *
|
|
22 */
|
|
23 public abstract class SetDiff {
|
|
24
|
|
25 /**
|
|
26 * @return the set of added elements
|
|
27 */
|
|
28 public abstract Set getAdditions();
|
|
29
|
|
30 /**
|
|
31 * @return the set of removed elements
|
|
32 */
|
|
33 public abstract Set getRemovals();
|
|
34
|
|
35 /**
|
|
36 * @see java.lang.Object#toString()
|
|
37 */
|
|
38 public String toString() {
|
|
39 StringBuffer buffer = new StringBuffer();
|
|
40 buffer
|
85
|
41 .append(.getName(this.classinfo))
|
78
|
42 .append("{additions [") //$NON-NLS-1$
|
|
43 .append(getAdditions() !is null ? getAdditions().toString() : "null") //$NON-NLS-1$
|
|
44 .append("], removals [") //$NON-NLS-1$
|
|
45 .append(getRemovals() !is null ? getRemovals().toString() : "null") //$NON-NLS-1$
|
|
46 .append("]}"); //$NON-NLS-1$
|
|
47
|
|
48 return buffer.toString();
|
|
49 }
|
|
50 }
|