
fitnesse.wikitext.parser.MatchResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fitnesse Show documentation
Show all versions of fitnesse Show documentation
The fully integrated standalone wiki, and acceptance testing framework.
The newest version!
package fitnesse.wikitext.parser;
import java.util.ArrayList;
import java.util.List;
public class MatchResult {
public MatchResult() {
this.length = 0;
matched = true;
}
public int getLength() { return length; }
public List getOptions() { return options; }
public boolean isMatched() { return matched; }
public void addLength(int length) { this.length += length; }
public void noMatch() { setMatched(false); }
public void setMatched(boolean matched) { this.matched = matched; }
public void addOption(String option) {
addLength(option.length());
options.add(option);
}
public void checkLength(int check) {
if (check > 0) addLength(check); else noMatch();
}
public void advance(ScanString scan) {
scan.moveNext(length);
}
private int length;
private final ArrayList options = new ArrayList<>(1);
private boolean matched;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy