net.diversionmc.parser.pattern.PatternResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of parser Show documentation
Show all versions of parser Show documentation
Diversion Network Parser API.
package net.diversionmc.parser.pattern;
import net.diversionmc.parser.Parser;
/**
* Represents a result of a sentence parse.
*
* @param length Amount of pieces used by this pattern.
* @param result Resulting sentence.
* @param Sentence type, matching {@link ParsePattern} and {@link Parser}.
*/
public record PatternResult(int length, T result) {
/**
* Check if resulting sentence is a statement.
*
* @return {@link Sentence#isStatement()}
*/
public boolean isStatement() {
return result.isStatement();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy