Skip to content
This repository was archived by the owner on Apr 27, 2022. It is now read-only.

Commit 53ee78d

Browse files
committed
Made SimpleKey and SimpleLink implement Serializable
- no cost + more reliable this way
1 parent 9bcd44a commit 53ee78d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/main/java/cufy/util/AbstractNode.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import org.jetbrains.annotations.NotNull;
1919
import org.jetbrains.annotations.Nullable;
2020

21+
import java.io.Serializable;
2122
import java.util.*;
2223

2324
/**
@@ -420,7 +421,10 @@ public int size() {
420421
* @version 0.0.1
421422
* @since 0.0.1 ~2021.04.22
422423
*/
423-
public static class SimpleKey implements Key {
424+
public static class SimpleKey implements Key, Serializable {
425+
@SuppressWarnings("JavaDoc")
426+
private static final long serialVersionUID = 2334516389085542258L;
427+
424428
/**
425429
* The opposite key of this key.
426430
*
@@ -538,7 +542,10 @@ public String toString() {
538542
* @version 0.0.1
539543
* @since 0.0.1 ~2021.04.18
540544
*/
541-
public static class SimpleLink<V> implements Link<V> {
545+
public static class SimpleLink<V> implements Link<V>, Serializable {
546+
@SuppressWarnings("JavaDoc")
547+
private static final long serialVersionUID = -3772698734748896812L;
548+
542549
/**
543550
* The key of this link.
544551
*

0 commit comments

Comments
 (0)