diff options
Diffstat (limited to 'bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java')
-rw-r--r-- | bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java index da2e79ff..616f8efc 100644 --- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java +++ b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiffEntry.java @@ -12,42 +12,43 @@ package org.eclipse.core.databinding.observable.list; /** - * A single addition of an element to a list or removal of an element from a list. - * + * A single addition of an element to a list or removal of an element from a + * list. + * + * @param <E> + * * @since 1.0 */ -public abstract class ListDiffEntry { - +public abstract class ListDiffEntry<E> { + /** * @return the 0-based position of the addition or removal */ public abstract int getPosition(); - + /** - * @return true if this represents an addition, false if this represents a removal + * @return true if this represents an addition, false if this represents a + * removal */ public abstract boolean isAddition(); - + /** * @return the element that was added or removed */ - public abstract Object getElement(); - + public abstract E getElement(); + /** * @see java.lang.Object#toString() */ public String toString() { StringBuffer buffer = new StringBuffer(); - buffer - .append(this.getClass().getName()) - .append("{position [") //$NON-NLS-1$ - .append(getPosition()) - .append("], isAddition [") //$NON-NLS-1$ - .append(isAddition()) - .append("], element [") //$NON-NLS-1$ - .append(getElement() != null ? getElement().toString() : "null") //$NON-NLS-1$ - .append("]}"); //$NON-NLS-1$ - + buffer.append(this.getClass().getName()).append("{position [") //$NON-NLS-1$ + .append(getPosition()).append("], isAddition [") //$NON-NLS-1$ + .append(isAddition()) + .append("], element [") //$NON-NLS-1$ + .append(getElement() != null ? getElement().toString() : "null") //$NON-NLS-1$ + .append("]}"); //$NON-NLS-1$ + return buffer.toString(); } } |