nl.hippo.client.api.event
Class EventValidityImpl

java.lang.Object
  extended by nl.hippo.client.api.event.EventValidityImpl
All Implemented Interfaces:
Serializable, SourceValidity, EventValidity

public class EventValidityImpl
extends Object
implements EventValidity

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface nl.hippo.client.api.caching.SourceValidity
INVALID, UNKNOWN, VALID
 
Constructor Summary
EventValidityImpl(String name)
           
 
Method Summary
 boolean equals(Object o)
           
 NamedEvent getEvent()
          Returns the specific NamedEvent this validity is based on.
 int hashCode()
           
 int isValid()
          Check if the component is still valid.
 int isValid(SourceValidity newValidity)
          Check if the component is still valid.
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventValidityImpl

public EventValidityImpl(String name)
Method Detail

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 :

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.