nl.hippo.client.api.event
Class EventValidityImpl
java.lang.Object
nl.hippo.client.api.event.EventValidityImpl
- All Implemented Interfaces:
- Serializable, SourceValidity, EventValidity
public class EventValidityImpl
- extends Object
- implements EventValidity
- See Also:
- Serialized Form
EventValidityImpl
public EventValidityImpl(String name)
getEvent
public NamedEvent getEvent()
- Returns the specific NamedEvent this validity is based on.
- Specified by:
getEvent in interface EventValidity
- Returns:
- Event
equals
public boolean equals(Object o)
- Specified by:
equals in interface EventValidity- Overrides:
equals in class Object
hashCode
public int hashCode()
- Specified by:
hashCode in interface EventValidity- Overrides:
hashCode in class Object
toString
public String toString()
- Specified by:
toString in interface EventValidity- Overrides:
toString in class Object
isValid
public int isValid()
- Description copied from interface:
SourceValidity
- Check if the component is still valid. The possible results are :
-1: invalid. The component isn't valid anymore.
0: don't know. This validity should be checked against a new
validity object using SourceValidity.isValid(SourceValidity).
1: valid. The component is still valid.
- Specified by:
isValid in interface SourceValidity
isValid
public int isValid(SourceValidity newValidity)
- Description copied from interface:
SourceValidity
- Check if the component is still valid. This is only true if the incoming Validity
is of the same type and has the "same" values.
The invocation order is that the isValid
method of the old Validity object is called with the new one as a
parameter.
- Specified by:
isValid in interface SourceValidity
- Returns:
- -1 is returned, if the validity object is not valid anymore
+1 is returned, if the validity object is still valid
0 is returned, if the validity check could not be performed.
In this case, the new validity object is not usable. Examples
for this are: when the validity objects have different types,
or when one validity object for any reason is not able to
get the required information.
Copyright © 2006-2009 Hippo. All Rights Reserved.