Class PublicSuffixes.Node

java.lang.Object
org.archive.net.PublicSuffixes.Node
All Implemented Interfaces:
Comparable<PublicSuffixes.Node>
Enclosing class:
PublicSuffixes

public static class PublicSuffixes.Node extends Object implements Comparable<PublicSuffixes.Node>
prefix tree node. each Node represents sequence of letters (prefix) and alternative sequences following it (list of Node's). Nodes in branches are sorted for skip list like lookup and for generating effective regular expression (see compareTo(Node) and compareTo(char). as is intended for internal use only, there's no access methods. procedures for updating prefix tree with new input are defined within this class (addBranch(CharSequence)). terminal node could be represented in two different form: 1) Node with zero branches, or 2) Node with zero-length cs. So, root node must be initialized with empty (not null) branches unless empty string matches the overall pattern. cs must not be null except for root node.
Author:
Gojomo this version of PublicSuffixes uses suffix-tree data structure for generating less redundant regular expression. It may be even possible to write a light-weight, thread-safe matcher based on this class., Kenji Nagahashi