Added destroy() method to DistributedPrimitive interface
Implement replace method in ConsistentMap
Using Versioned#valueOrNull in place of Versioned#valueOrElse where appropriate

Change-Id: Ief3f3547d589d35f5c821a1c47035f91078e8316
diff --git a/core/api/src/main/java/org/onosproject/cluster/DefaultPartition.java b/core/api/src/main/java/org/onosproject/cluster/DefaultPartition.java
index 5832608..07a5d71 100644
--- a/core/api/src/main/java/org/onosproject/cluster/DefaultPartition.java
+++ b/core/api/src/main/java/org/onosproject/cluster/DefaultPartition.java
@@ -42,6 +42,11 @@
         this.members = ImmutableSet.copyOf(members);
     }
 
+    public DefaultPartition(Partition other) {
+        this.id = checkNotNull(other.getId());
+        this.members = ImmutableSet.copyOf(other.getMembers());
+    }
+
     @Override
     public PartitionId getId() {
         return this.id;