All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.diversionmc.parser.pattern.PatternResult Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
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