|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmicrosoft.exchange.webservices.data.misc.MapiTypeConverterMapEntry
public class MapiTypeConverterMapEntry
Represents an entry in the MapiTypeConverter map.
| Constructor Summary | |
|---|---|
MapiTypeConverterMapEntry(Class<?> type)
Initializes a new instance of the MapiTypeConverterMapEntry class. |
|
| Method Summary | |
|---|---|
Object |
changeType(Object value)
Change value to a value of compatible type. |
Object |
convertToValue(String stringValue)
Converts a string to value consistent with type. |
Object |
convertToValueOrDefault(String stringValue)
Converts a string to value consistent with type (or uses the default value if the string is null or empty). |
protected IFunction<Object,String> |
getConvertToString()
Gets the string to object converter. |
protected Object |
getDefaultValue()
Gets the default value for the type. |
static int |
getDim(Object array)
Gets the dim. |
boolean |
getIsArray()
Gets a value indicating whether this instance is array. |
protected IFunction<String,Object> |
getParse()
Gets the string parser. |
Class<?> |
getType()
Gets the type. |
protected void |
setConvertToString(IFunction<Object,String> value)
Sets the string to object converter. |
protected void |
setIsArray(boolean value)
Sets the checks if is array. |
protected void |
setParse(IFunction<String,Object> value)
Sets the string parser. |
void |
setType(Class<?> cls)
Sets the type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapiTypeConverterMapEntry(Class<?> type)
type - The type. y default, converting a type to string is done by
calling value.ToString. Instances can override this behavior.
By default, converting a string to the appropriate value type
is done by calling Convert.ChangeType Instances may override
this behavior.| Method Detail |
|---|
public Object changeType(Object value)
throws Exception
value - The value.
Exception - the exception
public Object convertToValue(String stringValue)
throws ServiceXmlDeserializationException,
FormatException
stringValue - String to convert to a value.
ServiceXmlDeserializationException - the service xml deserialization exception
FormatException - the format exception
public Object convertToValueOrDefault(String stringValue)
throws ServiceXmlDeserializationException,
FormatException
stringValue - to convert to a value.
FormatException
ServiceXmlDeserializationExceptionpublic static int getDim(Object array)
array - the array
public Class<?> getType()
public void setType(Class<?> cls)
cls - the new typepublic boolean getIsArray()
protected void setIsArray(boolean value)
value - the new checks if is arrayprotected IFunction<Object,String> getConvertToString()
protected void setConvertToString(IFunction<Object,String> value)
value - the valueprotected IFunction<String,Object> getParse()
protected void setParse(IFunction<String,Object> value)
value - the valueprotected Object getDefaultValue()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||