com.taco.swinger.text2gui
Class StringToLayerConverter

java.lang.Object
  extended by com.taco.text.AbstractStringToObjectConverter
      extended by com.taco.text.MappedStringToObjectConverter
          extended by com.taco.swinger.text2gui.StringToLayerConverter
All Implemented Interfaces:
IStringToObjectConverter, IObjectMapper, java.io.Serializable

public class StringToLayerConverter
extends MappedStringToObjectConverter

A converter from strings to layer identifiers. It accepts identifier strings as well as integer literals.

See Also:
Serialized Form

Field Summary
static StringToLayerConverter instance
           
 
Fields inherited from class com.taco.text.MappedStringToObjectConverter
_defaultValue, _map, _NO_DEFAULT_VALUE
 
Method Summary
 java.lang.Object toObject(java.lang.String s)
          See if the string is mapped to a value.
 
Methods inherited from class com.taco.text.AbstractStringToObjectConverter
map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static final StringToLayerConverter instance
Method Detail

toObject

public java.lang.Object toObject(java.lang.String s)
                          throws java.text.ParseException
Description copied from class: MappedStringToObjectConverter
See if the string is mapped to a value. If so, unwrap the value (it may be MapUtilities.NULL_MAP_VALUE, indicating that the string is mapped to null). If the string is not mapped, return the default value if one was specified during construction. Otherwise, throw a ParseException.

Specified by:
toObject in interface IStringToObjectConverter
Overrides:
toObject in class MappedStringToObjectConverter
Throws:
java.text.ParseException