commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <pbened...@apache.org>
Subject [lang 3] Validate: rename methods
Date Sun, 29 Nov 2009 17:31:45 GMT
I want to rename isTrue to validateArgument (which throws 
IllegalArgumentException); then also introduce validateState (which 
throws IllegalStateException).

I also propose we rename the methods so that the verb "validate" 
prefixes them all (Google Collections uses "check"). Furthermore, this 
will better namespace the method when static imports are used:
isTrue         -> validateArgument / validateState
notNull        -> validateNotNull
notEmpty       -> validateNotEmpty
notBlank       -> validateNotBlank
validIndex     -> validateElementIndex
noNullElements -> validateElementsNotNull

I also want to introduce some new methods:
validateInstanceOf
validateAssignable

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


Mime
View raw message