Make Pair class final to ensure immutability
- Follow the Java convention for immutable objects
- Test the immutability by using ImmutableClassChecker
Change-Id: I0514f5b620800f8c0d20d0d130cb0f214a7344c8
diff --git a/src/main/java/net/onrc/onos/core/util/Pair.java b/src/main/java/net/onrc/onos/core/util/Pair.java
index c5ab775..66b60b8 100644
--- a/src/main/java/net/onrc/onos/core/util/Pair.java
+++ b/src/main/java/net/onrc/onos/core/util/Pair.java
@@ -11,7 +11,7 @@
* @param <F> the type of the first value
* @param <S> the type type of the second value
*/
-public class Pair<F, S> {
+public final class Pair<F, S> {
private final F first; // The first value in the pair
private final S second; // The second value in the pair