[
https://issues.apache.org/jira/browse/LANG-579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henri Yandell closed LANG-579.
------------------------------
Resolution: Fixed
Thanks Valentin.
svn ci -m "Applying Valentin Rocher's patch to LANG-579, adding new regexp and
in range methods to Validate"
Sending pom.xml
Sending src/main/java/org/apache/commons/lang3/Validate.java
Sending src/test/java/org/apache/commons/lang3/ValidateTest.java
Transmitting file data ...
Committed revision 907382.
It doesn't include the validatePattern(Pattern ...) variant, but I think that's
fine. We can easily add that (presumably so people can set flags) if it proves
popular.
> Add new Validate methods
> ------------------------
>
> Key: LANG-579
> URL: https://issues.apache.org/jira/browse/LANG-579
> Project: Commons Lang
> Issue Type: Improvement
> Components: lang.*
> Affects Versions: 3.0
> Environment: Java SE 5.0+
> Reporter: Michael Wooten
> Priority: Minor
> Fix For: 3.0
>
> Attachments: LANG_579.diff
>
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> Expand Validate to include more specific, human readable validation for
> commonly validated parameter values (so isTrue() isn't needed as often).
> Include new Validate methods:
> matchesPattern(String string, String pattern)
> throws an IllegalArgumentException stating ("The string " + string + " does
> not match the pattern " + pattern) when the provided string does not match
> the regular expression pattern.
> matchesPattern(String string, String pattern, String message)
> throws an IllegalArgumentException stating (message + string) when the
> provided string does not match the regular expression pattern.
> matchesPattern(String string, Pattern pattern)
> throws an IllegalArgumentException stating ("The string " + string + " does
> not match the pattern " + pattern) when the provided string does not match
> the regular expression pattern.
> matchesPattern(String string, Pattern pattern, String message)
> throws an IllegalArgumentException stating (message + string) when the
> provided string does not match the regular expression pattern.
> inclusiveBetween(Comparable<T> start, Comparable<T> end, Comparable<T> value)
> throws an IllegalArgumentException stating ("The value " + value + " is not
> in the specified inclusive range of " + start + " to " + end) when the
> provided value does not fall between the two comparable values (inclusive).
> inclusiveBetween(Comparable<T> start, Comparable<T> end, Comparable<T> value,
> String message)
> throws an IllegalArgumentException stating (message + value) when the
> provided value does not fall between the two comparable values (inclusive).
> exclusiveBetween(Comparable<T> start, Comparable<T> end, Comparable<T> value)
> throws an IllegalArgumentException stating ("The value " + value + " is not
> in the specified exclusive range of " + start + " to " + end) when the
> provided value does not fall between the two comparable values (exclusive).
> exclusiveBetween(Comparable<T> start, Comparable<T> end, Comparable<T> value,
> String message)
> throws an IllegalArgumentException stating (message + value) when the
> provided value does not fall between the two comparable values (exclusive).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.