Class RegExList
Object
org.anchoranalysis.bean.AnchorBean<RegEx>
org.anchoranalysis.bean.shared.regex.RegEx
org.anchoranalysis.bean.shared.regex.RegExList
public class RegExList extends RegEx
Combines one or more
RegEx together, by successively trying to match each RegEx
until success.
The order of RegExes in the list determines the order that matching is tried.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description RegExList() -
Method Summary
Modifier and Type Method Description List<RegEx>getList()The list ofRegExes that are successively tried to be matched.Optional<String[]>match(String string)Returns an array of string components it matches successfully, orOptional.empty()if it cannot match.voidsetList(List<RegEx> list)The list ofRegExes that are successively tried to be matched.StringtoString()Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
RegExList
public RegExList()
-
-
Method Details
-
match
Description copied from class:RegExReturns an array of string components it matches successfully, orOptional.empty()if it cannot match.- Specified by:
matchin classRegEx- Parameters:
string- string to match against the regular-expression.- Returns:
- an array of string components representing each group in the match, or
Optional.empty()if no match is possible.
-
toString
- Overrides:
toStringin classAnchorBean<RegEx>
-
getList
The list ofRegExes that are successively tried to be matched. -
setList
The list ofRegExes that are successively tried to be matched.
-