commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: [lang] is there a release on the visible horizon?
Date Mon, 01 Jul 2002 00:58:12 GMT


> > > 6) Numbers has a lot of comments about future things. Plus
> containsDigits()
> > > has question marks against the null handling
> >
> > Question marks meaning, should containsDigit consider null to contain
> > digits or not, or should it not even check.
> Or should it throw an exception (and which one)
>
>
> > > 9) Constant
> ...
> > Biggest issue to me on Constant is that I have discovered it has
> > Serialisation problems, might have to scrap it for this alone as I've not
> > found a solution without making it an Enum structure.
> I would favour a structure more like Enum. Maybe I should checkin my
> classes, and they could be -1ed or Constant removed as appropriate.

It'd be great to have an Enum set, though it seems something that many
people have done and will have different requirements for, so will
probably undergo changes for a while.

> > > 10) Strings - some methods are very specific (too specific) and could be
> > > removed
> > > - parseObjectKey
> > > - removeUnderscores
> >
> > These are quite old. We might want to enquire as to who is dependant on
> > them and then kill them.
> How do we do that? Just delete them and see if anyone complains?

Cvs log, email, then rm.

> > > The class seems too big. Maybe some smaller associated utility classes
> would
> > > be appropriate?
> > > CharSet methods seem to be a group. Could they be in their own class?
> Also
> > > why is evaluateSet public when a CharSet cannot be passed in anywhere.
> >
> > CharSet used to be a public class. It was put into Strings for
> > organisational purposes while it lived in the Util project and hasn't been
> > broken out again.
> But do you agree with a new class taking the static methods as well? In fact
> do they become instance methods?

+1 on the new class taking the static methods. Whether people should think
in terms of CharSets or char[]'s though I'm unsure. Possibly static
methods which call instance methods. I tend to like want to keep things
open a bit too much sometimes.

> > > Add
> > > - left(String, int len), right(String, int len) and mid(String, int
> from,
> > > int len) to Strings, no exceptions  (as per BASIC)
> >
> > So what do these do? Didn't have them in BBC BASIC in 1984 :)
>
> Yes you did ;-) And on the Archimedes too.
> left(String str, int len)  is the same as substring(0, len) but returns the
> string without exceptions if length < len
> right(String str, int len)  is the same as substring(str.length() - len) but
> returns the string without exceptions if length < len
> mid(String str, int start, int len)  is the same as substring(start, len)
> but returns the remainder of the string without exceptions if len chars not
> available

Now I'm going to have to head back to my parents and dredge out the beeb
and manual :)

+1 on these funcs.


Hen


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


Mime
View raw message