| java.lang.Object com.jcorporate.expresso.core.security.filters.FilterTree
FilterTree | public class FilterTree (Code) | | A filter tree is a data structure that allows for quick matching and replacement
of strings. Use it for a fast 'search and replace' system. Construction
and setup is a fairly expensive operation in comparison to the actual searching,
so use it for static types of filters that are usually instantiated for a long time.
author: Michael Rimov |
FilterTree | public FilterTree()(Code) | | |
addFilterString | public void addFilterString(String specialString, String replacementString) throws Exception(Code) | | Insert a filtering string into the parse tree.
Parameters: specialString - the string to look for Parameters: replacementString - the string to replace it with. throws: Exception - if insertNode() or setReplacementstring() fails |
replaceFilter | public String replaceFilter(char[] input)(Code) | | Filters a string in a search and replace algorithm. Uses a "greedy" approach
so that it gets the biggest "fitting" string to cut.
Parameters: input - character array to examine. The filtered string |
|
|