public class MatchPatternTransformer extends Object implements org.apache.commons.collections4.Transformer<String,Boolean>
LazyMap
with Key=String (=RegEx) and Value=Boolean (=Result).
Example: <% request.setAttribute("matchPatternMap", LazyMap.decorate(new HashMap(), new MatchPatternTransformer("testString"))); %> <html> <head></head> <body> ${matchPatternMap['testString']} == true <br /> ${matchPatternMap['.*String']} == true <br /> ${matchPatternMap['test.*']} == true <br /> ${matchPatternMap['.*string']} == false <br /> </body> <html>
Pattern
Constructor and Description |
---|
MatchPatternTransformer(String compareValue) |
Copyright © 2008–2014. All rights reserved.