You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Leon Messerschmidt <le...@psybergate.com> on 2004/07/01 10:21:33 UTC

Aggregate Tool

Hello,

I think I'm still a Velocity committer, but I've been inactive for so 
long I'd rather contribute like a non-committer for a while.

For one of our projects I created an Aggregate Tool.  This tool takes a 
list of numbers and calculates the sum/average for the list of numbers.

The tool can also take a list of beans and a field name.  It will then 
extract the numeric values for the field and add them together.

~ Leon

RE: Aggregate Tool

Posted by "Marinó A. Jónsson" <ma...@centrum.is>.
Leon I think Nathan is way ahead of you there ;)

Marinó

> -----Original Message-----
> From: Leon Messerschmidt [mailto:leon@psybergate.com] 
> Sent: 22. júlí 2004 05:23
> To: Velocity Developers List
> Subject: Re: Aggregate Tool
> 
> 
> Hi,
> 
> No protests for my side.  I'll move the functionality to the 
> Math tool 
> and resubmit.
> 
> ~ Leon
> 
> Nathan Bubna wrote:
> > yeah, and actually, the more i think about it, the more 
> sure i am that 
> > this belongs there.  that way we can take advantage of MathTool's 
> > existing object-to-number conversion code and the matchType() stuff 
> > for return values. and i'm actually almost done with the switch. 
> > <grin/>  just gotta test and i'll check this in soon.  Leon, please 
> > protest if you feel strongly otherwise.
> > :)
> > 
> > Nathan Bubna
> > nathan@esha.com
> > 
> > ----- Original Message -----
> > From: "Marinó A. Jónsson" <ma...@centrum.is>
> > To: "'Velocity Developers List'" <ve...@jakarta.apache.org>
> > Sent: Wednesday, July 21, 2004 2:23 PM
> > Subject: RE: Aggregate Tool
> > 
> > 
> > that's actually the first question that came to my mind when Leon 
> > originally posted the thing :)
> > 
> > Marinó
> > 
> > 
> >>-----Original Message-----
> >>From: Nathan Bubna [mailto:nathan@esha.com]
> >>Sent: 21. júlí 2004 20:57
> >>To: Velocity Developers List
> >>Subject: Re: Aggregate Tool
> >>
> >>
> >>Leon Messerschmidt said:
> >>...
> >>
> >>>For one of our projects I created an Aggregate Tool.  This
> >>
> >>tool takes
> >>
> >>>a list of numbers and calculates the sum/average for the list of 
> >>>numbers.
> >>>
> >>>The tool can also take a list of beans and a field name.
> >>
> >>It will then
> >>
> >>>extract the numeric values for the field and add them together.
> >>
> >>...
> >>
> >>while sneaking in a few hours today for veltools stuff, i 
> decided to 
> >>test this out.  it works fine and seems useful. so i'd like 
> to check 
> >>it in.  my only question is why not put this functionality into 
> >>MathTool?  it is just simple math, after all.
> >>
> >>thoughts on this from anyone are welcome, but i do 
> especially want to 
> >>hear from Leon. :)
> >>
> >>Nathan Bubna
> >>nathan@esha.com
> >>
> >>
> >>------------------------------------------------------------
> ---------
> >>To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: 
> velocity-dev-help@jakarta.apache.org
> >>
> >>
> > 
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: 
> velocity-dev-help@jakarta.apache.org
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: 
> velocity-dev-help@jakarta.apache.org
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: Aggregate Tool

Posted by Leon Messerschmidt <le...@psybergate.com>.
Hi,

No protests for my side.  I'll move the functionality to the Math tool 
and resubmit.

~ Leon

Nathan Bubna wrote:
> yeah, and actually, the more i think about it, the more sure i am that this
> belongs there.  that way we can take advantage of MathTool's existing
> object-to-number conversion code and the matchType() stuff for return values.
> and i'm actually almost done with the switch. <grin/>  just gotta test and
> i'll check this in soon.  Leon, please protest if you feel strongly otherwise.
> :)
> 
> Nathan Bubna
> nathan@esha.com
> 
> ----- Original Message ----- 
> From: "Marinó A. Jónsson" <ma...@centrum.is>
> To: "'Velocity Developers List'" <ve...@jakarta.apache.org>
> Sent: Wednesday, July 21, 2004 2:23 PM
> Subject: RE: Aggregate Tool
> 
> 
> that's actually the first question that came to my mind when Leon originally
> posted the thing :)
> 
> Marinó
> 
> 
>>-----Original Message-----
>>From: Nathan Bubna [mailto:nathan@esha.com]
>>Sent: 21. júlí 2004 20:57
>>To: Velocity Developers List
>>Subject: Re: Aggregate Tool
>>
>>
>>Leon Messerschmidt said:
>>...
>>
>>>For one of our projects I created an Aggregate Tool.  This
>>
>>tool takes
>>
>>>a list of numbers and calculates the sum/average for the list of
>>>numbers.
>>>
>>>The tool can also take a list of beans and a field name.
>>
>>It will then
>>
>>>extract the numeric values for the field and add them together.
>>
>>...
>>
>>while sneaking in a few hours today for veltools stuff, i
>>decided to test this out.  it works fine and seems useful.
>>so i'd like to check it in.  my only question is why not put
>>this functionality into MathTool?  it is just simple math, after all.
>>
>>thoughts on this from anyone are welcome, but i do especially
>>want to hear from Leon. :)
>>
>>Nathan Bubna
>>nathan@esha.com
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>>
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: Aggregate Tool

Posted by Nathan Bubna <na...@esha.com>.
yeah, and actually, the more i think about it, the more sure i am that this
belongs there.  that way we can take advantage of MathTool's existing
object-to-number conversion code and the matchType() stuff for return values.
and i'm actually almost done with the switch. <grin/>  just gotta test and
i'll check this in soon.  Leon, please protest if you feel strongly otherwise.
:)

Nathan Bubna
nathan@esha.com

----- Original Message ----- 
From: "Marinó A. Jónsson" <ma...@centrum.is>
To: "'Velocity Developers List'" <ve...@jakarta.apache.org>
Sent: Wednesday, July 21, 2004 2:23 PM
Subject: RE: Aggregate Tool


that's actually the first question that came to my mind when Leon originally
posted the thing :)

Marinó

> -----Original Message-----
> From: Nathan Bubna [mailto:nathan@esha.com]
> Sent: 21. júlí 2004 20:57
> To: Velocity Developers List
> Subject: Re: Aggregate Tool
>
>
> Leon Messerschmidt said:
> ...
> > For one of our projects I created an Aggregate Tool.  This
> tool takes
> > a list of numbers and calculates the sum/average for the list of
> > numbers.
> >
> > The tool can also take a list of beans and a field name.
> It will then
> > extract the numeric values for the field and add them together.
> ...
>
> while sneaking in a few hours today for veltools stuff, i
> decided to test this out.  it works fine and seems useful.
> so i'd like to check it in.  my only question is why not put
> this functionality into MathTool?  it is just simple math, after all.
>
> thoughts on this from anyone are welcome, but i do especially
> want to hear from Leon. :)
>
> Nathan Bubna
> nathan@esha.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


RE: Aggregate Tool

Posted by "Marinó A. Jónsson" <ma...@centrum.is>.
that's actually the first question that came to my mind when Leon originally
posted the thing :)

Marinó

> -----Original Message-----
> From: Nathan Bubna [mailto:nathan@esha.com] 
> Sent: 21. júlí 2004 20:57
> To: Velocity Developers List
> Subject: Re: Aggregate Tool
> 
> 
> Leon Messerschmidt said:
> ...
> > For one of our projects I created an Aggregate Tool.  This 
> tool takes 
> > a list of numbers and calculates the sum/average for the list of 
> > numbers.
> >
> > The tool can also take a list of beans and a field name.  
> It will then 
> > extract the numeric values for the field and add them together.
> ...
> 
> while sneaking in a few hours today for veltools stuff, i 
> decided to test this out.  it works fine and seems useful.  
> so i'd like to check it in.  my only question is why not put 
> this functionality into MathTool?  it is just simple math, after all.
> 
> thoughts on this from anyone are welcome, but i do especially 
> want to hear from Leon. :)
> 
> Nathan Bubna
> nathan@esha.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: Aggregate Tool

Posted by Nathan Bubna <na...@esha.com>.
Leon Messerschmidt said:
...
> For one of our projects I created an Aggregate Tool.  This tool takes a
> list of numbers and calculates the sum/average for the list of numbers.
>
> The tool can also take a list of beans and a field name.  It will then
> extract the numeric values for the field and add them together.
...

while sneaking in a few hours today for veltools stuff, i decided to test this
out.  it works fine and seems useful.  so i'd like to check it in.  my only
question is why not put this functionality into MathTool?  it is just simple
math, after all.

thoughts on this from anyone are welcome, but i do especially want to hear
from Leon. :)

Nathan Bubna
nathan@esha.com


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: Aggregate Tool

Posted by Leon Messerschmidt <le...@psybergate.com>.
Hi Nathan,

No problem - I know paid work can be a pain in the behind ;-)

I have some more contributions, but they're no quite ready yet.  You 
will probably hear more from me soon.

~ Leon

Nathan Bubna wrote:
> Leon Messerschmidt said:
> ...
> 
>>For one of our projects I created an Aggregate Tool.  This tool takes a
>>list of numbers and calculates the sum/average for the list of numbers.
>>
>>The tool can also take a list of beans and a field name.  It will then
>>extract the numeric values for the field and add them together.
> 
> ...
> 
> first, sorry for the slow response.  really, i am reading emails right now, i
> just haven't the time to deal with them.  i'm swamped with life and paid work
> at the moment.  second, the tool looks good; i'll try it out (and then commit
> it) as soon as i get a chance.  unless, that is, marino or dlr beats me to it.
> :)
> 
> Nathan Bubna
> nathan@esha.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: Aggregate Tool

Posted by Nathan Bubna <na...@esha.com>.
Leon Messerschmidt said:
...
> For one of our projects I created an Aggregate Tool.  This tool takes a
> list of numbers and calculates the sum/average for the list of numbers.
>
> The tool can also take a list of beans and a field name.  It will then
> extract the numeric values for the field and add them together.
...

first, sorry for the slow response.  really, i am reading emails right now, i
just haven't the time to deal with them.  i'm swamped with life and paid work
at the moment.  second, the tool looks good; i'll try it out (and then commit
it) as soon as i get a chance.  unless, that is, marino or dlr beats me to it.
:)

Nathan Bubna
nathan@esha.com


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org