|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.convert.conversion.IdentityConversionFactory
public class IdentityConversionFactory
Conversion from TimeZone to String using getID().
| Field Summary | |
|---|---|
static ConversionFactory |
INSTANCE
Singleton instance of this factory |
| Constructor Summary | |
|---|---|
protected |
IdentityConversionFactory()
Restricted constructor. |
| Method Summary | |
|---|---|
Conversion |
getInstance(Object value,
Class fromType,
Class toType)
Create a new conversion object for the specified from and to types. |
int |
getMatchPercent(Object value,
Class fromType,
Class toType)
Checks if the types are equal, if so return 80. |
String |
toString()
Gets a string suitable for debugging. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ConversionFactory INSTANCE
| Constructor Detail |
|---|
protected IdentityConversionFactory()
| Method Detail |
|---|
public int getMatchPercent(Object value,
Class fromType,
Class toType)
getMatchPercent in interface ConversionFactoryvalue - the value to be converted, read only, may be nullfromType - the type to convert from, may be nulltoType - the type to convert to, may be null
public Conversion getInstance(Object value,
Class fromType,
Class toType)
This implementation returns the identity conversion.
getInstance in interface ConversionFactoryvalue - the value to be converted, read only, may be nullfromType - the type to convert from, may be nulltoType - the type to convert to, may be null
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||