commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: [LANG] support for k, M suffices when parsing numbers
Date Thu, 02 Jun 2011 14:52:55 GMT
On Thu, Jun 2, 2011 at 10:50 AM, James Carman <james@carmanconsulting.com>wrote:

> On Thu, Jun 2, 2011 at 10:31 AM, Matt Benson <gudnabrsam@gmail.com> wrote:
> > FWIW, this type of code lives in Ant as long
> > org.apache.tools.ant.util.StringUtils#parseHumanSizes(String).  IMO it
> > would be fine to copy/adapt this method into lang3 in perhaps
> > StringUtils or NumberUtils.  No harm in creating MemUtils as James
> > suggested, but unless we can think of other things to go there I don't
> > know if it can be justified.
> >
>
> I would also suggest a method that takes a long and spits out a string
> with the biggest denomination (kb, mb, gb, etc.) it can find to
> display it.
>
> If it doesn't go in its own class, where else would you put it?
> Perhaps StringUtils or NumberUtils?  Maybe even SystemUtils, since
> there are memory-related methods in System?
>

I like MemUtils so far.

Gary

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


-- 
Thank you,
Gary

http://garygregory.wordpress.com/
http://garygregory.com/
http://people.apache.org/~ggregory/
http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message