
in.ashwanthkumar.utils.parser.ParserResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of my-java-utils Show documentation
Show all versions of my-java-utils Show documentation
My personal set of utils that I take along with my java projects.
The newest version!
package in.ashwanthkumar.utils.parser;
import in.ashwanthkumar.utils.func.Function;
public abstract class ParserResult {
protected String remainingInput;
public ParserResult(String remainingInput) {
this.remainingInput = remainingInput;
}
/**
* Return the underlying result of the result
*
* @return
*/
abstract public T get();
abstract public ParserResult map(Function transform);
abstract public boolean successful();
public boolean empty() {
return !successful();
}
public String getRemainingInput() {
return remainingInput;
}
public ParserResult setRemainingInput(String remainingInput) {
this.remainingInput = remainingInput;
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy