Paul Benedict wrote:
I want to rename isTrue to validateArgument (which throws
IllegalArgumentException); then also introduce validateState (which
throws IllegalStateException).
We have this in a work version of this class, I'm not sure that it
doesn't confuse the purpose of the class. As such, I think I'd prefer a
second State checking class, so this one is solely argument checking.
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
I'm not sure I buy static imports here. They are no shorter than the
original Validate.notNull (well one character shorter).
If we are renaming, I'd suggest
Validate.noNullElements -> Validate.noNulls
Stephen
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org