querqy.trie.States 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;
import java.util.LinkedList;
import java.util.List;
/**
* @author René Kriegler, @renekrie
*
*/
public class States {
private List> prefixes = null;
private final State completeSequence;
public States(State completeSequence) {
this.completeSequence = completeSequence;
}
public void addPrefix(State prefix) {
if (prefixes == null) {
prefixes = new LinkedList<>();
}
prefixes.add(prefix);
}
public State getStateForCompleteSequence() {
return completeSequence;
}
public List> getPrefixes() {
return prefixes;
}
@Override
public String toString() {
return "States [prefixes=" + prefixes + ", completeSequence="
+ completeSequence + "]";
}
}