com.yworks.yfiles.server.graphml.support.reflection
Interface ITypeConverter

All Known Implementing Classes:
IMarkupExtensionFactoryTypeConverter, LabelConverter, NodeScaledParameterConverter

public interface ITypeConverter

Implementations of this interface can convert instances of one default class into or back from instances of other classes.


Method Summary
 boolean canConvertFrom(java.lang.Object object)
          Returns, if the given object can be converted back to an instance of the default Class type of this implementation.
 boolean canConvertTo(java.lang.Object object, java.lang.Class type)
          Returns, if the given object can be converted in an instance of the given class type.
 java.lang.Object convertFrom(java.lang.Object object)
          Converts the given object back to an instance of the default Class type of this implementation.
 java.lang.Object convertTo(java.lang.Object object, java.lang.Class type)
          Converts the given object in an instance of the given class type and return this instance.
 

Method Detail

canConvertTo

public boolean canConvertTo(java.lang.Object object,
                            java.lang.Class type)
Returns, if the given object can be converted in an instance of the given class type.

Parameters:
object - Object which shall be converted.
type - Class type to which the given object shall be converted.

convertTo

public java.lang.Object convertTo(java.lang.Object object,
                                  java.lang.Class type)
Converts the given object in an instance of the given class type and return this instance.

Parameters:
object - Object to convert.
type - Class type to convert to.
Returns:
The converted object.

canConvertFrom

public boolean canConvertFrom(java.lang.Object object)
Returns, if the given object can be converted back to an instance of the default Class type of this implementation.

Parameters:
object - Object which shall be converted back.

convertFrom

public java.lang.Object convertFrom(java.lang.Object object)
Converts the given object back to an instance of the default Class type of this implementation.

Parameters:
object - The Object to convert back.
Returns:
The back converted object.


Copyright © 2000-2013 yWorks GmbH. All rights reserved