dsto.dfc.swing.text.selection
Class BooleanSelector

java.lang.Object
  extended by dsto.dfc.swing.text.selection.BooleanSelector
All Implemented Interfaces:
Convertable, PatternSelector, Selector, Copyable, Serializable, Cloneable

public class BooleanSelector
extends Object
implements PatternSelector, Convertable, Copyable, Serializable

Selector that matches booleans. Valid values are "true", "false", "T", and "F", case-insensitive. "1" and "0" are not valid values.

Version:
$Revision$
Author:
weberd
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface dsto.dfc.swing.text.selection.PatternSelector
PatternSelector.SelectAllSelector
 
Field Summary
static ValueConverter CONVERTER
           
 
Fields inherited from interface dsto.dfc.swing.text.selection.PatternSelector
SELECT_ALL
 
Constructor Summary
BooleanSelector()
           
BooleanSelector(String value)
           
 
Method Summary
 Object clone()
          Create a completely separate copy of this object and any mutable objects owned by the object.
 ValueConverter getConverter()
          Return a converter that at least supports conversion to and from String.
 String getExpression()
           
 boolean matches(Object value)
          True if this pattern selector matches the given value.
 void setExpression(String value)
          Set the boolean value.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONVERTER

public static final ValueConverter CONVERTER
Constructor Detail

BooleanSelector

public BooleanSelector()
                throws IllegalFormatException
Throws:
IllegalFormatException

BooleanSelector

public BooleanSelector(String value)
                throws IllegalFormatException
Throws:
IllegalFormatException
Method Detail

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 value)
                   throws IllegalFormatException
Set the boolean value. "True", "False", "T", and "F" are valid values, case-insensitively, but "1" and "0" are not.

Specified by:
setExpression in interface PatternSelector
Parameters:
value - 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