commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ola Berg" <ola.b...@ports.se>
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.

/O


--
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