net.sf.staccatocommons.lang.predicate.internal
Class Matches
java.lang.Object
net.sf.staccatocommons.lang.predicate.AbstractPredicate<T>
net.sf.staccatocommons.lang.predicate.internal.TopLevelPredicate<String>
net.sf.staccatocommons.lang.predicate.internal.Matches
- All Implemented Interfaces:
- Serializable, net.sf.staccatocommons.defs.Applicable<String,Boolean>, net.sf.staccatocommons.defs.Evaluable<String>, net.sf.staccatocommons.defs.predicate.Predicate<String>
public class Matches
- extends TopLevelPredicate<String>
A Predicate that evaluates if a String mathes a Pattern
- Author:
- flbulgarelli
- See Also:
- Serialized Form
Matches
public Matches(String regexp)
- Creates a new
Matches using a regular expression
- Parameters:
regexp - the regular expression. Non null.
Matches
public Matches(Pattern pattern)
- Creates a new
Matches using a Pattern.
- Parameters:
pattern - the pattern. Non null
eval
public boolean eval(@NonNull
String input)
- Specified by:
eval in interface net.sf.staccatocommons.defs.Evaluable<String>- Specified by:
eval in class AbstractPredicate<String>
Copyright © 2010-2012 Staccatocommons. All Rights Reserved.