public class GroupCountFunction extends AbstractFunction
Constructor and Description |
---|
GroupCountFunction()
Default constructor.
|
GroupCountFunction(String name,
String group)
Constructs a report function for counting groups.
|
Modifier and Type | Method and Description |
---|---|
String |
getGroup()
Returns the name of the group to be counted.
|
String |
getParentGroup()
Returns the name of the group on which to reset the counter.
|
Object |
getValue()
Returns the number of groups processed so far (including the current group).
|
void |
groupStarted(ReportEvent event)
Receives notification that a new group is about to start.
|
void |
reportInitialized(ReportEvent event)
Receives notification that a new report is about to start.
|
void |
setGroup(String group)
defines the name of the group to be counted.
|
void |
setParentGroup(String group)
defines the name of the group on which to reset the counter.
|
groupFinished, itemsAdvanced, itemsFinished, itemsStarted, reportDone, reportFinished, reportStarted, summaryRowSelection
clone, getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone, getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setDependencyLevel, setName, setRuntime
public GroupCountFunction()
public GroupCountFunction(String name, String group)
name
- The function name.group
- The group name.NullPointerException
- if the given name is nullpublic String getParentGroup()
public void setParentGroup(String group)
group
- the name of the group to be counted.public String getGroup()
public void setGroup(String group)
group
- the name of the group to be counted.public void reportInitialized(ReportEvent event)
reportInitialized
in interface ReportListener
reportInitialized
in class AbstractFunction
event
- the current report event received.public void groupStarted(ReportEvent event)
groupStarted
in interface ReportListener
groupStarted
in class AbstractFunction
event
- the current report event received.public Object getValue()