< prev index next >
src/java.base/share/classes/java/util/TreeSet.java
Print this page
@@ -492,10 +492,11 @@
* elements it contains) (int), followed by all of its
* elements (each an Object) in order (as determined by the
* set's Comparator, or by the elements' natural ordering if
* the set has no Comparator).
*/
+ @java.io.Serial
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
// Write out any hidden stuff
s.defaultWriteObject();
@@ -512,10 +513,11 @@
/**
* Reconstitute the {@code TreeSet} instance from a stream (that is,
* deserialize it).
*/
+ @java.io.Serial
private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException {
// Read in any hidden stuff
s.defaultReadObject();
@@ -554,7 +556,8 @@
*/
public Spliterator<E> spliterator() {
return TreeMap.keySpliteratorFor(m);
}
+ @java.io.Serial
private static final long serialVersionUID = -2479143000061671589L;
}
< prev index next >