
querqy.trie.State Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of querqy-core Show documentation
Show all versions of querqy-core Show documentation
Querqy library for query rewriting: Querqy Core
/**
*
*/
package querqy.trie;
/**
* @author René Kriegler, @renekrie
*
*/
public class State {
public final T value;
public final boolean isKnown;
public final Node node;
/**
* The index of the last matching char
*/
public final int index;
public State(boolean isKnown, T value, Node node) {
this(isKnown, value, node, -1);
}
public State(boolean isKnown, T value, Node node, int index) {
this.isKnown = isKnown;
this.value = value;
this.node = node;
this.index = index;
}
public boolean isKnown() {
return isKnown;
}
public boolean isFinal() {
return isKnown() && value != null;
}
public T getValue() {
return value;
}
public int getIndex() {
return index;
}
@Override
public String toString() {
return "State [value=" + value + ", isKnown=" + isKnown + ", index=" + index + "]";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy