org.apache.tapestry.util.io
Class BooleanAdaptor

java.lang.Object
  extended by org.apache.tapestry.util.io.BooleanAdaptor
All Implemented Interfaces:
SqueezeAdaptor

public class BooleanAdaptor
extends Object
implements SqueezeAdaptor

Squeezes a Boolean.

Author:
Howard Lewis Ship

Constructor Summary
BooleanAdaptor()
           
 
Method Summary
 Class getDataClass()
          Returns the class (or interface) which can be encoded by this adaptor.
 String getPrefix()
          Returns one or more characters, each of which will be a prefix for this adaptor.
 String squeeze(DataSqueezer squeezer, Object data)
          Squeezes the Booleandata to either 'T' or 'F'.
 Object unsqueeze(DataSqueezer squeezer, String string)
          Unsqueezes the string to either Boolean.TRUEor Boolean.FALSE, depending on the prefix character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanAdaptor

public BooleanAdaptor()
Method Detail

getPrefix

public String getPrefix()
Description copied from interface: SqueezeAdaptor
Returns one or more characters, each of which will be a prefix for this adaptor.

Specified by:
getPrefix in interface SqueezeAdaptor

getDataClass

public Class getDataClass()
Description copied from interface: SqueezeAdaptor
Returns the class (or interface) which can be encoded by this adaptor.

Specified by:
getDataClass in interface SqueezeAdaptor

squeeze

public String squeeze(DataSqueezer squeezer,
                      Object data)
Squeezes the Booleandata to either 'T' or 'F'.

Specified by:
squeeze in interface SqueezeAdaptor

unsqueeze

public Object unsqueeze(DataSqueezer squeezer,
                        String string)
Unsqueezes the string to either Boolean.TRUEor Boolean.FALSE, depending on the prefix character.

Specified by:
unsqueeze in interface SqueezeAdaptor


Copyright © 2006 Apache Software Foundation. All Rights Reserved.