diff options
Diffstat (limited to 'bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/SimplePropertyEvent.java')
-rw-r--r-- | bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/SimplePropertyEvent.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/SimplePropertyEvent.java b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/SimplePropertyEvent.java index f811d2be..03aaec16 100644 --- a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/SimplePropertyEvent.java +++ b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/SimplePropertyEvent.java @@ -20,9 +20,11 @@ import org.eclipse.core.internal.databinding.property.Util; /** * Event object events in the properties API * + * @param <D> + * type of the diff handled by this event * @since 1.2 */ -public final class SimplePropertyEvent extends EventObject { +public final class SimplePropertyEvent<D extends IDiff> extends EventObject { private static final long serialVersionUID = 1L; /** @@ -53,7 +55,7 @@ public final class SimplePropertyEvent extends EventObject { * If event == CHANGE, a diff object describing the change in state, or null * for an unknown change. */ - public final IDiff diff; + public final D diff; /** * Constructs a PropertyChangeEvent with the given attributes @@ -69,7 +71,7 @@ public final class SimplePropertyEvent extends EventObject { * is unknown or not applicable. */ public SimplePropertyEvent(int type, Object source, IProperty property, - IDiff diff) { + D diff) { super(source); this.type = type; this.property = property; @@ -84,7 +86,7 @@ public final class SimplePropertyEvent extends EventObject { if (getClass() != obj.getClass()) return false; - SimplePropertyEvent that = (SimplePropertyEvent) obj; + SimplePropertyEvent<?> that = (SimplePropertyEvent<?>) obj; return Util.equals(getSource(), that.getSource()) && Util.equals(this.property, that.property) && Util.equals(this.diff, that.diff); |