|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jagg.Aggregator
net.sf.jagg.ConcatAggregator
public class ConcatAggregator
This class represents the "concatenation" aggregator over any values for
which toString is well-defined, with an optional separator
String between values.
| Field Summary |
|---|
| Fields inherited from class net.sf.jagg.Aggregator |
|---|
PROP_SELF |
| Constructor Summary | |
|---|---|
ConcatAggregator(java.lang.String property)
Constructs a ConcatAggregator that operates on the specified
property, with an empty separator string. |
|
ConcatAggregator(java.lang.String property,
java.lang.String separator)
Constructs a ConcatAggregator that operates on the specified
property, with the given separator string. |
|
| Method Summary | |
|---|---|
void |
init()
Initialize the ConcatAggregator to an empty StringBuilder. |
void |
iterate(java.lang.Object value)
Concatenate the value as a String, and possibly a separator. |
void |
merge(Aggregator agg)
Merge the given Aggregator into this one. |
ConcatAggregator |
replicate()
Returns an uninitialized copy of this Aggregator object,
with the same property(ies) to analyze. |
protected void |
setProperty(java.lang.String property)
Extracts a possible separator String from the property in
the format: property, "separator". |
java.lang.String |
terminate()
Return the concatenation of all aggregated values. |
java.lang.String |
toString()
A String representation of this
ConcatAggregator, which takes into account the possible
existence of a separator String specified in the property. |
| Methods inherited from class net.sf.jagg.Aggregator |
|---|
equals, getAggregator, getAggregator, getProperty, getValueFromProperty, hashCode, isInUse, setInUse, terminateDoubleDouble |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConcatAggregator(java.lang.String property)
ConcatAggregator that operates on the specified
property, with an empty separator string.
property - Concatenate this property's values.
public ConcatAggregator(java.lang.String property,
java.lang.String separator)
ConcatAggregator that operates on the specified
property, with the given separator string.
property - Concatenate this property's values.separator - The separator String.| Method Detail |
|---|
public ConcatAggregator replicate()
Aggregator object,
with the same property(ies) to analyze.
replicate in class AggregatorAggregator object.protected void setProperty(java.lang.String property)
String from the property in
the format: property, "separator".
setProperty in class Aggregatorproperty - A property name and possible separator.Aggregator.getProperty()public void init()
StringBuilder.
init in class Aggregatorpublic void iterate(java.lang.Object value)
String, and possibly a separator.
iterate in class Aggregatorvalue - The value to aggregate.Aggregator.getValueFromProperty(java.lang.Object, java.lang.String)public void merge(Aggregator agg)
Aggregator into this one. Any separator
String will be maintained by this
ConcatAggregator.
merge in class Aggregatoragg - The Aggregator to merge into this one.public java.lang.String terminate()
terminate in class AggregatorString, or an empty
String if no values were processed.public java.lang.String toString()
String representation of this
ConcatAggregator, which takes into account the possible
existence of a separator String specified in the property.
toString in class Aggregator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||