Class TreeSetConverter
java.lang.Object
com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
com.thoughtworks.xstream.converters.collections.CollectionConverter
com.thoughtworks.xstream.converters.collections.TreeSetConverter
- All Implemented Interfaces:
Converter
,ConverterMatcher
Converts a java.util.TreeSet to XML, and serializes
the associated java.util.Comparator. The converter
assumes that the elements in the XML are already sorted
according the comparator.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
marshal
(Object source, HierarchicalStreamWriter writer, MarshallingContext context) Convert an object to textual data.private Object
unmarshal
(HierarchicalStreamReader reader, UnmarshallingContext context) Convert textual data back into an object.Methods inherited from class com.thoughtworks.xstream.converters.collections.CollectionConverter
addCurrentElementToCollection, canConvert, createCollection, populateCollection, populateCollection
Methods inherited from class com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
mapper, readBareItem, readCompleteItem, readItem, writeBareItem, writeCompleteItem, writeItem, writeNullItem
-
Field Details
-
treeMapConverter
-
-
Constructor Details
-
TreeSetConverter
-
-
Method Details
-
marshal
Description copied from interface:Converter
Convert an object to textual data.- Specified by:
marshal
in interfaceConverter
- Overrides:
marshal
in classCollectionConverter
- Parameters:
source
- The object to be marshalled.writer
- A stream to write to.context
- A context that allows nested objects to be processed by XStream.
-
unmarshal
Description copied from interface:Converter
Convert textual data back into an object.- Specified by:
unmarshal
in interfaceConverter
- Overrides:
unmarshal
in classCollectionConverter
- Parameters:
reader
- The stream to read the text from.context
-- Returns:
- The resulting object.
-
readResolve
-