pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.statistics.util
Class ResultIHasDurationDataMatrixRow<T extends IHasDuration,U extends IRowDataBuilder<T,V>,V extends AbstractRowData<T>>

java.lang.Object
  extended by org.torweg.pulse.component.statistics.util.ResultIHasDurationDataMatrixRow<T,U,V>
Type Parameters:
T - the IHasDuration implementation the ResultIHasDurationDataMatrix aggregates
U - the IRowDataBuilder
V - the underlying AbstractRowData row data implementation
All Implemented Interfaces:
java.io.Serializable, IHasDuration

public final class ResultIHasDurationDataMatrixRow<T extends IHasDuration,U extends IRowDataBuilder<T,V>,V extends AbstractRowData<T>>
extends java.lang.Object
implements IHasDuration, java.io.Serializable

Represents a row within the ResultIHasDurationDataMatrix.

Version:
$Revision: 1562 $
Author:
Daniel Dietz
See Also:
Serialized Form

Constructor Summary
protected ResultIHasDurationDataMatrixRow()
          Deprecated. 
  ResultIHasDurationDataMatrixRow(Duration dur, U builder)
          Creates a new Row with the given duration and the given builder.
 
Method Summary
 void add(T dataObject)
          Adds the given dataObject if the duration of the dataObject is within or equal the internal duration.
 V getData()
          Returns the row data object.
 Duration getDuration()
          Returns the duration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultIHasDurationDataMatrixRow

@Deprecated
protected ResultIHasDurationDataMatrixRow()
Deprecated. 

Default constructor.


ResultIHasDurationDataMatrixRow

public ResultIHasDurationDataMatrixRow(Duration dur, U builder)
Creates a new Row with the given duration and the given builder.

Parameters:
dur - the Duration
builder - the IRowDataBuilder
Method Detail

getDuration

public Duration getDuration()
Returns the duration.

Specified by:
getDuration in interface IHasDuration
Returns:
the duration.
See Also:
IHasDuration.getDuration()

add

public void add(T dataObject)
Adds the given dataObject if the duration of the dataObject is within or equal the internal duration.

Parameters:
dataObject - the IHasDuration
Throws:
java.lang.IllegalArgumentException - if the duration of the given dataObject is NOT within or equal the internal duration

getData

public V getData()
Returns the row data object.

Returns:
the AbstractRowData row data object