class RegexTrie {

    public boolean contains(final String string) {
        // starting with the root node
        Node current = root;
        final int length = string.length();
        
        // for each character in the string
        for (int i = 0; i < length; i++) {
            // get the node for this character
            current = current.next.get(string.charAt(i));
            // if no node, then no match
            if (current == null) {
                return false;
            }
        }
        
        // if we got here, then we matched the entire string.
        // We have a true match if this node was marked as a termination point
        return current.terminator;
    }

    public  RegexTrie();
    public  RegexTrie(List<String> strings);
    public  RegexTrie(String... strings);

}