Oracle® Coherence Java API Reference
v3.5

E14977-01

com.tangosol.util
Class AnyEvent

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

public class AnyEvent
extends java.util.EventObject
implements java.io.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  java.lang.Object value
          The value associated with this event.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AnyEvent(java.lang.Object source, java.lang.Object value)
          Construct a new AnyEvent.
 
Method Summary
 int getInt()
          Gets the associated value as a java int.
 java.lang.String getString()
          Gets the associated value as a java.lang.String.
 java.lang.Object getValue()
          Gets the associated value.
 
Methods inherited from class java.util.EventObject
getSource, toString
 

Field Detail

value

protected java.lang.Object value
The value associated with this event.

Constructor Detail

AnyEvent

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

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

getValue

public java.lang.Object getValue()
Gets the associated value.

Returns:
the value associated with the event

getString

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

Returns:
the string value associated with the event
Throws:
java.lang.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:
java.lang.ClassCastException - if the event's value is not a Number

Oracle® Coherence Java API Reference
v3.5

E14977-01

Copyright © 2000, 2009, Oracle. All rights reserved.