<sigh>

> Any views on NN for 'not null' ?

What's the problem with spelling this stuff out?  -1 on using NN instead
of NotNull.  Are we really concerned with saving space (a whole 4
characters) or reducing typing over making code more readable?  Keep in
mind that more and more people are using IDEs that automatically display
the available methods on an object once you hit the ".", e.g.:

  if ( StringUtils.

as soon as I type this, all of the methods are displayed...if I see:

isBlank
isBlankNN
isEmpty
isEmptyNN

then I will have to go to the JavaDoc to see what NN is.

if I instead see:

isBlank
isBlankNotNull
isEmpty
isEmptyNotNull

then not only do I know what isEmptyNotNull does, it also solidifies the
meaning of isEmpty.

;ted

> 
> Stephen
> 
> ----- Original Message -----
> From: "Henri Yandell" <[EMAIL PROTECTED]>
> > On Fri, 18 Jul 2003, Gary Gregory wrote:
> >
> > > I like #2.
> >
> > Boo! ;)
> >
> > Seriously for a moment. I think the usage of commons-lang 
> is beginning to
> > hit the up-curve. It's creeping into projects and people 
> are starting to
> > talk about it [along with other Commons things] outside of the usual
> > circles. A 2.0 soon will really take off I believe.
> >
> > > A clarification please: I do not see why any isWhitespace 
> methods are
> needed
> > > since the isBlank methods trim()'s their arguments.
> > >
> > > isBlank(null) returns true
> > > isWS(null) returns true
> > >
> > > isBlank("") returns true
> > > isWS("") returns true
> > >
> > > isBlank(" ") returns true
> > > isWS(" ") returns true
> > >
> > > isBlank("\t\n") returns true
> > > isWS("\t\n") returns true
> > >
> > > isBlank(" Hello ") returns false
> > > isWS(" Hello ") returns false
> > >
> > > Am I missing something?
> >
> > Re-reading Stephen's suggestion, only thing I can see is that he
> > suggests that isBlank("\t\n") would not be true. However a 
> quick test
> > shows that trim() removes all whitespace, so I'm a believer 
> in Gary's
> > point.
> >
> > Hen
> >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to