com.sas.util.transforms
Class StaticDictionaryInterfaceToStringTransform

com.sas.util.transforms.StaticDictionaryInterfaceToStringTransform
All Implemented Interfaces:
com.sas.util.transforms.TransformInputOutputInterface, com.sas.util.transforms.TransformInterface, java.io.Serializable
Direct Known Subclasses:
DictionaryInterfaceToStringTransform

public class StaticDictionaryInterfaceToStringTransform
implements com.sas.util.transforms.TransformInputOutputInterface

A transform for converting a StaticDictionaryInterface to a String

See Also:
StringToDictionaryInterfaceTransform, Serialized Form

Field Summary
static StaticDictionaryInterfaceToStringTransform defaultInstance
          An object which can perform a default transform from StaticDictionaryInterface to String.
 
Constructor Summary
StaticDictionaryInterfaceToStringTransform()
          Default constructor.
StaticDictionaryInterfaceToStringTransform(char delimiter, char separator, boolean alwaysQuote)
          Value constructor.
 
Method Summary
protected static char defaultDelimiterChar()
           
 java.lang.Class getInputClass()
           
 java.lang.Class getOutputClass()
           
protected  java.lang.String quote(java.lang.Object item)
           
 java.lang.Object transform(com.sas.collection.AssociationListInterface object)
          Transform an object.
 java.lang.Object transform(java.lang.Object object)
          Transform an object.
 

Field Detail

defaultInstance

public static final StaticDictionaryInterfaceToStringTransform defaultInstance
An object which can perform a default transform from StaticDictionaryInterface to String.

Constructor Detail

StaticDictionaryInterfaceToStringTransform

public StaticDictionaryInterfaceToStringTransform()
Default constructor. Create a transform which converts a StaticDictionaryInterface into a String, using the default delimiter ',' and always quoting strings.


StaticDictionaryInterfaceToStringTransform

public StaticDictionaryInterfaceToStringTransform(char delimiter,
                                                  char separator,
                                                  boolean alwaysQuote)
Value constructor. Create a transform which converts a StaticDictionaryInterface into a String, using the specific delimiter and quoting.

Parameters:
delimiter - character to separate the string items in the result
separator - a separator which appears between the keys and the values
alwaysQuote - if true, each string is quoted, else only special strings are quoted.
Method Detail

defaultDelimiterChar

protected static char defaultDelimiterChar()

transform

public java.lang.Object transform(java.lang.Object object)
Transform an object. This method transforms a StaticDictionaryInterface to a String.

Specified by:
transform in interface com.sas.util.transforms.TransformInterface
Parameters:
object - an input object. Must be null or an instance of StaticDictionaryInterface
Returns:
a string representation of the string list.

transform

public java.lang.Object transform(com.sas.collection.AssociationListInterface object)
Transform an object. This method transforms a StaticDictionaryInterface to a String.

Parameters:
object - an input object. Must be null or an instance of StaticDictionaryInterface
Returns:
a string representation of the string list.

quote

protected java.lang.String quote(java.lang.Object item)

getInputClass

public java.lang.Class getInputClass()
Specified by:
getInputClass in interface com.sas.util.transforms.TransformInputOutputInterface

getOutputClass

public java.lang.Class getOutputClass()
Specified by:
getOutputClass in interface com.sas.util.transforms.TransformInputOutputInterface



Copyright © 2009 SAS Institute Inc. All Rights Reserved.