001 package org.nakedobjects.applib.events;
002
003 import org.nakedobjects.applib.Identifier;
004
005
006 /**
007 * Represents a check as to whether a particular object to be removed from a collection is valid or not.
008 *
009 * <p>
010 * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the object is invalid;
011 * otherwise the object is valid.
012 *
013 * @see CollectionAddToEvent
014 */
015 public class CollectionRemoveFromEvent extends ValidityEvent implements ProposedHolderEvent {
016
017 private static final long serialVersionUID = 1L;
018
019 private final Object proposed;
020
021 public CollectionRemoveFromEvent(final Object source, final Identifier collectionIdentifier, final Object proposed) {
022 super(source, collectionIdentifier);
023 this.proposed = proposed;
024 }
025
026 public Object getProposed() {
027 return proposed;
028 }
029
030 }