Class WareMapConverter
- java.lang.Object
-
- com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
-
- ch.sahits.game.openpatrician.model.service.persistance.converter.WareMapConverter
-
- All Implemented Interfaces:
com.thoughtworks.xstream.converters.Converter,com.thoughtworks.xstream.converters.ConverterMatcher
public class WareMapConverter extends com.thoughtworks.xstream.converters.collections.AbstractCollectionConverterConverter for Maps. General Maps are delegated to the MapConverter while any map of type EWare, Number are handled by this converter.- Author:
- Andi Hotz, (c) Sahits GmbH, 2016 Created on Jun 26, 2016
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAMOUNTABLEPRICE_ENTRY_NAMEstatic java.lang.StringDOUBLE_ENTRY_NAMEstatic java.lang.StringINT_ENTRY_NAME
-
Constructor Summary
Constructors Constructor Description WareMapConverter(com.thoughtworks.xstream.mapper.Mapper mapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanConvert(java.lang.Class type)voidmarshal(java.lang.Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)java.lang.Objectunmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
-
-
-
Field Detail
-
INT_ENTRY_NAME
public static final java.lang.String INT_ENTRY_NAME
- See Also:
- Constant Field Values
-
DOUBLE_ENTRY_NAME
public static final java.lang.String DOUBLE_ENTRY_NAME
- See Also:
- Constant Field Values
-
AMOUNTABLEPRICE_ENTRY_NAME
public static final java.lang.String AMOUNTABLEPRICE_ENTRY_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
marshal
public void marshal(java.lang.Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)- Specified by:
marshalin interfacecom.thoughtworks.xstream.converters.Converter- Specified by:
marshalin classcom.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
-
unmarshal
public java.lang.Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)- Specified by:
unmarshalin interfacecom.thoughtworks.xstream.converters.Converter- Specified by:
unmarshalin classcom.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
-
canConvert
public boolean canConvert(java.lang.Class type)
- Specified by:
canConvertin interfacecom.thoughtworks.xstream.converters.ConverterMatcher- Specified by:
canConvertin classcom.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
-
-