com.saucesubfresh.starter.crawler.parser.provider.RegexResult Maven / Gradle / Ivy
package com.saucesubfresh.starter.crawler.parser.provider;
/**
* Object contains regex results.
* For multi group result extension.
*
* @author [email protected]
* @since 0.1.0
*/
class RegexResult {
private String[] groups;
public static final RegexResult EMPTY_RESULT = new RegexResult();
public RegexResult() {
}
public RegexResult(String[] groups) {
this.groups = groups;
}
public String get(int groupId) {
if (groups == null) {
return null;
}
return groups[groupId];
}
}