dsto.dfc.swing.text.selection
Class StringSelector

java.lang.Object
  extended by dsto.dfc.swing.text.selection.StringSelector
All Implemented Interfaces:
Convertable, PatternSelector, Selector
Direct Known Subclasses:
StringContainsSelector

public class StringSelector
extends Object
implements PatternSelector

Simple selector matches values string-wise using toString () and equals ().

Version:
$Revision$

Nested Class Summary
 
Nested classes/interfaces inherited from interface dsto.dfc.swing.text.selection.PatternSelector
PatternSelector.SelectAllSelector
 
Field Summary
protected  boolean caseSensitive
           
static ValueConverter CONVERTER
           
protected  String string
           
 
Fields inherited from interface dsto.dfc.swing.text.selection.PatternSelector
SELECT_ALL
 
Constructor Summary
StringSelector()
           
StringSelector(String string)
           
StringSelector(String string, boolean caseSensitive)
           
 
Method Summary
 ValueConverter getConverter()
          Return a converter that at least supports conversion to and from String.
 String getExpression()
           
 boolean isCaseSensitive()
           
 boolean matches(Object value)
          True if this pattern selector matches the given value.
 void setCaseSensitive(boolean newValue)
           
 void setExpression(String expression)
          Set the value of the pattern used to match against.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONVERTER

public static final ValueConverter CONVERTER

string

protected String string

caseSensitive

protected boolean caseSensitive
Constructor Detail

StringSelector

public StringSelector()

StringSelector

public StringSelector(String string)

StringSelector

public StringSelector(String string,
                      boolean caseSensitive)
Method Detail

setExpression

public void setExpression(String expression)
Description copied from interface: PatternSelector
Set the value of the pattern used to match against.

Specified by:
setExpression in interface PatternSelector
Parameters:
expression - String value

getExpression

public String getExpression()
Specified by:
getExpression in interface PatternSelector

setCaseSensitive

public void setCaseSensitive(boolean newValue)

isCaseSensitive

public boolean isCaseSensitive()

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


Copyright © 2008 Commonwealth of Australia