public class BasicPatternList extends java.util.ArrayList<java.util.regex.Pattern> implements java.io.Serializable
Constructor and Description |
---|
BasicPatternList()
Creates an empty
BasicPatternList |
BasicPatternList(java.util.Collection<? extends java.util.regex.Pattern> patterns)
Creates a
BasicPatternList with the collection of patterns |
BasicPatternList(java.util.regex.Pattern... patterns)
Creates a pattern list for the specified patterns.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
asStringList()
Returns a list with the regular expressions from which the patters were
compiled
|
boolean |
emptyOrMatchesAny(java.lang.String s)
Returns true, if the pattern list is empty or
matchesAny(String)
returns true. |
boolean |
findsAnyIn(java.lang.String s)
Returns whether in the given string at least one of the contained pattern is
found.
|
boolean |
matchesAny(java.lang.String s)
Returns whether the given string matches at least one of the contained
pattern.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
public BasicPatternList()
BasicPatternList
public BasicPatternList(java.util.Collection<? extends java.util.regex.Pattern> patterns)
BasicPatternList
with the collection of patternspublic BasicPatternList(java.util.regex.Pattern... patterns)
public boolean emptyOrMatchesAny(java.lang.String s)
matchesAny(String)
returns true.public boolean matchesAny(java.lang.String s)
Matcher.matches()
method is used.public boolean findsAnyIn(java.lang.String s)
Matcher.find()
method is used.public java.util.List<java.lang.String> asStringList()