ccc.client.events
Class Event<T>

java.lang.Object
  extended by ccc.client.events.Event<T>
Type Parameters:
T - The type of the event.

public class Event<T>
extends java.lang.Object

An client event that can be handled on an event bus.

Author:
Civic Computing Ltd.

Constructor Summary
Event(T type)
          Constructor.
 
Method Summary
 Event<T> addProperty(java.lang.String key, java.lang.Object value)
          Add a property for this event.
<S> S
getProperty(java.lang.String key)
          Retrieve a property for this event.
 T getType()
          Accessor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Event

public Event(T type)
Constructor.

Parameters:
type - The type of the event.
Method Detail

getType

public T getType()
Accessor.

Returns:
Returns the type.

getProperty

public <S> S getProperty(java.lang.String key)
Retrieve a property for this event.

Type Parameters:
S - The type of the property.
Parameters:
key - The key for the property.
Returns:
The property or NULL if no property exists for the specified key.

addProperty

public Event<T> addProperty(java.lang.String key,
                            java.lang.Object value)
Add a property for this event.

Parameters:
key - The key the property will be stored under.
value - The value of the property.
Returns:
A reference to 'this', for method chaining.


Copyright © 2010. All Rights Reserved.