CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation

com.tangosol.util
Class AnyEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.tangosol.util.AnyEvent
All Implemented Interfaces:
Serializable

public class AnyEvent
extends EventObject
implements Serializable

An AnyEvent is an event used when no specific event implementation fits and it is not worth making one.

Author:
cp 1999.08.24

Field Summary
protected  Object value
          The value associated with this event.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AnyEvent(Object source, Object value)
          Construct a new AnyEvent.
 
Method Summary
 int getInt()
          Gets the associated value as a java int.
 String getString()
          Gets the associated value as a java.lang.String.
 Object getValue()
          Gets the associated value.
 
Methods inherited from class java.util.EventObject
getSource, toString
 

Field Detail

value

protected Object value
The value associated with this event.

Constructor Detail

AnyEvent

public AnyEvent(Object source,
                Object value)
Construct a new AnyEvent.

Parameters:
source - the event source
value - some value to provide to event listeners
Method Detail

getValue

public Object getValue()
Gets the associated value.

Returns:
the value associated with the event

getString

public String getString()
Gets the associated value as a java.lang.String.

Returns:
the string value associated with the event
Throws:
ClassCastException - if the event's value is not a String

getInt

public int getInt()
Gets the associated value as a java int.

Returns:
the int value associated with the event
Throws:
ClassCastException - if the event's value is not a Number

CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation