dsto.dfc.swing.text.selection
Class RegexSelector
java.lang.Object
dsto.dfc.swing.text.selection.RegexSelector
- All Implemented Interfaces:
- Convertable, PatternSelector, Selector, Copyable, Serializable, Cloneable
public class RegexSelector
- extends Object
- implements PatternSelector, Convertable, Copyable, Serializable
Selector that uses Perl 5 compatible regular expressions.
Implemented using ORO Matcher 1.1
http://www.quateams.com/oro/software/OROMatcher1.1.html.
- Version:
- $Revision$
- Author:
- mpp
- See Also:
- Serialized Form
CONVERTER
public static final ValueConverter CONVERTER
RegexSelector
public RegexSelector()
throws IllegalFormatException
- Throws:
IllegalFormatException
RegexSelector
public RegexSelector(String regex)
throws IllegalFormatException
- Throws:
IllegalFormatException
RegexSelector
public RegexSelector(String regex,
boolean caseSensitive)
throws IllegalFormatException
- Throws:
IllegalFormatException
matches
public boolean matches(Object value)
- Description copied from interface:
PatternSelector
- True if this pattern selector matches the given value.
- Specified by:
matches
in interface PatternSelector
- Specified by:
matches
in interface Selector
toString
public String toString()
- Overrides:
toString
in class Object
getConverter
public ValueConverter getConverter()
- Description copied from interface:
PatternSelector
- Return a converter that at least supports conversion to and from String.
- Specified by:
getConverter
in interface Convertable
- Specified by:
getConverter
in interface PatternSelector
getExpression
public String getExpression()
- Specified by:
getExpression
in interface PatternSelector
setExpression
public void setExpression(String regex)
throws IllegalFormatException
- Set the regex expression
- Specified by:
setExpression
in interface PatternSelector
- Parameters:
regex
- String value
- Throws:
IllegalFormatException
clone
public Object clone()
throws CloneNotSupportedException
- Description copied from interface:
Copyable
- Create a completely separate copy of this object and any mutable
objects owned by the object.
NOTE: subclasses should not remove the CloneNotSupportedException
throws clause if they themselves support subclassing:
removing the CloneNotSupportedException declaration stops
subclasses from indicating that a clone was not possible.
- Specified by:
clone
in interface Copyable
- Overrides:
clone
in class Object
- Throws:
CloneNotSupportedException
- if the clone failed or is not
possible.
Copyright © 2008 Commonwealth of Australia