net.sourceforge.xwing
Class BooleanToTextAdapter
java.lang.Object
net.sourceforge.xwing.AbstractSourceSink
net.sourceforge.xwing.FilteringSourceSink
net.sourceforge.xwing.BooleanToTextAdapter
- All Implemented Interfaces:
- SourceSink
- public class BooleanToTextAdapter
- extends FilteringSourceSink
A SourceSink that converts Boolean values
that are set and retrieved via its get() and set()
methods and text values in an underlying SourceSink.
- Version:
- $Revision: 1.3 $
- Author:
- Scott Howlett
Method Summary |
protected Object |
readFilter(Object value)
Transform a value on its way out from the underlying
SourceSink. |
protected Object |
writeFilter(Object value)
Transform a value on its way into the underlying
SourceSink. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BooleanToTextAdapter
public BooleanToTextAdapter(SourceSink srcSink,
String trueText,
String falseText)
- Create a new BooleanToTextAdapter.
- Parameters:
srcSink
- A SourceSink that gets and sets String values.trueText
- The String value from the underlying SourceSink
that should be interpreted as Boolean.TRUE.falseText
- The String value from the underlying
SourceSink that should be interpreted as Boolean.FALSE.
readFilter
protected Object readFilter(Object value)
- Description copied from class:
FilteringSourceSink
- Transform a value on its way out from the underlying
SourceSink.
- Specified by:
readFilter
in class FilteringSourceSink
- Parameters:
value
- The value read from the underlying SourceSink
- Returns:
- The value to be returned to the caller of this
SourceSink's get() method.
writeFilter
protected Object writeFilter(Object value)
- Description copied from class:
FilteringSourceSink
- Transform a value on its way into the underlying
SourceSink.
- Specified by:
writeFilter
in class FilteringSourceSink
- Parameters:
value
- The value passed in by the caller of
this SourceSink's set() method.
- Returns:
- The value to be written into the underlying
SourceSink.
Copyright © 2003 The Xwing Project. All Rights Reserved.