ecologylab.collections
Class PrefixCollection

java.lang.Object
  extended by ecologylab.generic.Debug
      extended by ecologylab.collections.PrefixPhrase
          extended by ecologylab.collections.PrefixCollection

public class PrefixCollection
extends PrefixPhrase

An optimized data structure for managing a hierarchical collection of prefixes, automatically merging and removing entries, and providing a fast matching function.

Author:
andruid

Constructor Summary
PrefixCollection()
          Construct a PrefixCollection in which each prefix can be parsed into PrefixPhrases, using the separator to split the phrases.
PrefixCollection(char separator)
          Construct a PrefixCollection in which each prefix can be parsed into PrefixPhrases, using the separator to split the phrases.
 
Method Summary
 PrefixPhrase add(ParsedURL purl)
           
static void main(java.lang.String[] s)
           
 boolean match(ParsedURL purl)
           
 char separator()
           
 java.util.ArrayList<java.lang.String> values()
           
 
Methods inherited from class ecologylab.collections.PrefixPhrase
add, add, clear, getPrefix, isTerminal, lookupChild, match, match, numChildren, toStringBuilder, values
 
Methods inherited from class ecologylab.generic.Debug
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, getClassName, getInteractive, getPackageName, getPackageName, getPackageName, initialize, level, level, level, logToFile, print, print, println, println, println, println, println, println, printlnA, printlnA, printlnA, printlnI, printlnI, printlnI, printlnI, setLoggingFile, show, show, superString, toggleInteractive, toString, toString, warning, warning, weird, weird
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrefixCollection

public PrefixCollection(char separator)
Construct a PrefixCollection in which each prefix can be parsed into PrefixPhrases, using the separator to split the phrases.

Parameters:
separator -

PrefixCollection

public PrefixCollection()
Construct a PrefixCollection in which each prefix can be parsed into PrefixPhrases, using the separator to split the phrases.

Parameters:
separator -
Method Detail

add

public PrefixPhrase add(ParsedURL purl)

match

public boolean match(ParsedURL purl)

values

public java.util.ArrayList<java.lang.String> values()

main

public static void main(java.lang.String[] s)

separator

public char separator()