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 TypeMethodDescriptionvoidmarshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) Convert an object to textual data.private Objectunmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) Convert textual data back into an object.Methods inherited from class CollectionConverter
addCurrentElementToCollection, canConvert, createCollection, populateCollection, populateCollectionMethods inherited from class AbstractCollectionConverter
mapper, readBareItem, readCompleteItem, readItem, writeBareItem, writeCompleteItem, writeItem, writeNullItem
-
Field Details
-
treeMapConverter
-
-
Constructor Details
-
TreeSetConverter
-
-
Method Details
-
marshal
Description copied from interface:ConverterConvert an object to textual data.- Specified by:
marshalin interfaceConverter- Overrides:
marshalin 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:ConverterConvert textual data back into an object.- Specified by:
unmarshalin interfaceConverter- Overrides:
unmarshalin classCollectionConverter- Parameters:
reader- The stream to read the text from.context-- Returns:
- The resulting object.
-
readResolve
-