commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ola Berg" <>
Subject [Lang] Assertions?
Date Mon, 21 Oct 2002 12:20:49 GMT
How about utilities for assertions?

I can imagine:

class Assert
    notNull( Object)
    noNullElements( Object[]) 
    notEmpty( Object[]) //works for collections too

plus either adding methods for common object types:

    notEmpty( String)

or adding assert* methods to the lang *Utils:

    assertNotEmpty( String)

When an assertion fails, the methods will throw IllegalArgumentException

Good or bad? I can do the coding, if people like it.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message