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

querqy.trie.States Maven / Gradle / Ivy

There is a newer version: 3.18.1
Show newest version
/**
 * 
 */
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 + "]";
    }
    
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy