com.skillw.pouvoir.util.read.Result Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Pouvoir Show documentation
Show all versions of Pouvoir Show documentation
Bukkit Script Engine Plugin.
The newest version!
package com.skillw.pouvoir.util.read;
import org.jetbrains.annotations.NotNull;
public class Result {
public T result = null;
public int start;
public int end;
public String all = null;
private Parser root = null;
public Result() {
}
public Result(Parser root) {
this.root = root;
}
public Result(Parser root, String all) {
this.root = root;
this.all = all;
}
public boolean matched() {
return this.result != null;
}
public Result setResult(T result) {
this.result = result;
return this;
}
public Result setRange(int start, int end) {
this.start = start;
this.end = end;
return this;
}
@NotNull
public Result parse() {
if (this.root == null || this.all == null) {
return new Result<>();
}
return this.root.parse(this.all.substring(this.end));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy