| |
|
| java.lang.Object org.jfree.report.function.AbstractExpression org.jfree.report.function.DateCutExpression
DateCutExpression | public class DateCutExpression extends AbstractExpression (Code) | | Prunes a date in a calendar-unware way. This method can be used to zero the milli-seconds or seconds and so on from a
date-object. For more complex operations, the
org.jfree.report.function.date.VariableDateExpression should be
used instead.
This expression simply executes a integer division followed by a integer multiplication on the milliseconds since
01-01-1970. For a factor of 1000, this sets the milliseconds to zero.
author: Martin Schmid |
Method Summary | |
public long | getFactor() Returns the factor by which the date should be pruned. | public String | getField() Returns the name of the data-row field from where to read the date that should be modified. | public Object | getValue() Computes the pruned date. | public void | setFactor(long factor) Defines the factor by which the date should be pruned. | public void | setField(String field) Defines the name of the data-row field from where to read the date that should be modified. |
DateCutExpression | public DateCutExpression()(Code) | | Default Constructor. The factor defaults to 1000.
|
getFactor | public long getFactor()(Code) | | Returns the factor by which the date should be pruned.
a factor. |
getField | public String getField()(Code) | | Returns the name of the data-row field from where to read the date that should be modified.
a field name. |
getValue | public Object getValue()(Code) | | Computes the pruned date.
the value of the function. |
setFactor | public void setFactor(long factor)(Code) | | Defines the factor by which the date should be pruned.
Parameters: factor - a factor. |
setField | public void setField(String field)(Code) | | Defines the name of the data-row field from where to read the date that should be modified.
Parameters: field - a field name. |
|
|
|