org.omnaest.utils.xml
Class JAXBMap<K,V>
java.lang.Object
org.omnaest.utils.structure.map.decorator.MapDecorator<K,V>
org.omnaest.utils.xml.JAXBMap<K,V>
- Type Parameters:
K - V -
- All Implemented Interfaces:
- Serializable, Map<K,V>
public class JAXBMap<K,V>
- extends MapDecorator<K,V>
The JAXBMap is a artificial XmlRootElement for an arbitrary Map instance. It just stores an internal
map instance and delegates all Map based methods to it.
Example output:
<map>
<entries>
<entry>
<key xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">key3</key>
<value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">value3</value>
</entry>
<entry>
<key xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">key2</key>
<value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">value2</value>
</entry>
<entry>
<key xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">key1</key>
<value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">value1</value>
</entry>
</entries>
</map>
- Author:
- Omnaest
- See Also:
newInstance(Map),
Serialized Form
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
| Fields inherited from class org.omnaest.utils.structure.map.decorator.MapDecorator |
map |
| Methods inherited from class org.omnaest.utils.structure.map.decorator.MapDecorator |
clear, containsKey, containsValue, entrySet, equals, get, getMap, hashCode, isEmpty, keySet, put, putAll, remove, setMap, size, toString, values |
JAXBMap
protected JAXBMap()
- See Also:
JAXBMap
JAXBMap
protected JAXBMap(Map<K,V> map)
- Parameters:
map - - See Also:
JAXBMap
newInstance
public static <M extends JAXBMap<K,V>,K,V> M newInstance(Map<K,V> map)
- Creates a new
Map wrapper.
- Type Parameters:
M - K - V - - Parameters:
map -
- Returns:
Copyright © 2013. All Rights Reserved.