org.yestech.event
Class AggregateResultReference

java.lang.Object
  extended by org.yestech.event.AggregateResultReference
All Implemented Interfaces:
Serializable

public final class AggregateResultReference
extends Object
implements Serializable

Represents an Aggregation of ResultReference.

See Also:
Serialized Form

Constructor Summary
AggregateResultReference()
           
 
Method Summary
<T> void
addResult(Enum<?> token, ResultReference<T> result)
          Adds a result to the aggregate.
 boolean containsResult(Enum<?> token)
          Checks if a result is available.
<T> T
getResult(Enum<?> token)
          Returns the Result contained in the associated ResultReference.
 Iterator<ResultReference> getResults()
          Returns all the associated ResultReference.
 int getTotal()
          Returns the number of results available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregateResultReference

public AggregateResultReference()
Method Detail

addResult

public <T> void addResult(Enum<?> token,
                          ResultReference<T> result)
Adds a result to the aggregate.

Type Parameters:
T - Type contained in the result reference
Parameters:
token - Token associated with the result
result - The Result

getResult

public <T> T getResult(Enum<?> token)
Returns the Result contained in the associated ResultReference.

Type Parameters:
T - Type contained in the result reference
Parameters:
token - Token associated with the result
Returns:
The Result contained in the associated ResultReference.

containsResult

public boolean containsResult(Enum<?> token)
Checks if a result is available.

Parameters:
token - Token to lookup
Returns:
true if available else false

getResults

public Iterator<ResultReference> getResults()
Returns all the associated ResultReference.

Returns:
the results

getTotal

public int getTotal()
Returns the number of results available.

Returns:
the number of results.


Copyright © 2010 YES Technology Association. All Rights Reserved.