Package io.vavr.collection
Class HashSet.SerializationProxy<T>
- java.lang.Object
-
- io.vavr.collection.HashSet.SerializationProxy<T>
-
- Type Parameters:
T
- The component type of the underlying list.
- All Implemented Interfaces:
java.io.Serializable
@GwtIncompatible("The Java serialization protocol is explicitly not supported") private static final class HashSet.SerializationProxy<T> extends java.lang.Object implements java.io.Serializable
A serialization proxy which, in this context, is used to deserialize immutable, linked Lists with final instance fields.
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
private HashArrayMappedTrie<T,T>
tree
-
Constructor Summary
Constructors Constructor Description SerializationProxy(HashArrayMappedTrie<T,T> tree)
Constructor for the case of serialization, called byHashSet.writeReplace()
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
readObject(java.io.ObjectInputStream s)
Read an object from a deserialization stream.private java.lang.Object
readResolve()
readResolve
method for the serialization proxy pattern.private void
writeObject(java.io.ObjectOutputStream s)
Write an object to a serialization stream.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
tree
private transient HashArrayMappedTrie<T,T> tree
-
-
Constructor Detail
-
SerializationProxy
SerializationProxy(HashArrayMappedTrie<T,T> tree)
Constructor for the case of serialization, called byHashSet.writeReplace()
. The constructor of a SerializationProxy takes an argument that concisely represents the logical state of an instance of the enclosing class.- Parameters:
tree
- a Cons
-
-
Method Detail
-
writeObject
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException
Write an object to a serialization stream.- Parameters:
s
- An object serialization stream.- Throws:
java.io.IOException
- If an error occurs writing to the stream.
-
readObject
private void readObject(java.io.ObjectInputStream s) throws java.lang.ClassNotFoundException, java.io.IOException
Read an object from a deserialization stream.- Parameters:
s
- An object deserialization stream.- Throws:
java.lang.ClassNotFoundException
- If the object's class read from the stream cannot be found.java.io.InvalidObjectException
- If the stream contains no list elements.java.io.IOException
- If an error occurs reading from the stream.
-
readResolve
private java.lang.Object readResolve()
readResolve
method for the serialization proxy pattern.Returns a logically equivalent instance of the enclosing class. The presence of this method causes the serialization system to translate the serialization proxy back into an instance of the enclosing class upon deserialization.
- Returns:
- A deserialized instance of the enclosing class.
-
-