Adding copy builders for flow objectives.

Adding missing hashCode and equals methods.

Change-Id: I97b2d904eacf0c45a95905c0891dbc6465e18ec6
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java
index b1d73a7..eb1e106 100644
--- a/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java
@@ -112,6 +112,13 @@
     Optional<ObjectiveContext> context();
 
     /**
+     * Returns a new builder set to create a copy of this objective.
+     *
+     * @return new builder
+     */
+    Objective.Builder copy();
+
+    /**
      * An objective builder.
      */
     interface Builder {
@@ -146,6 +153,36 @@
          */
         Builder withPriority(int priority);
 
-    }
+        /**
+         * Builds the objective that will be added.
+         *
+         * @return an objective
+         */
+        Objective add();
 
+        /**
+         * Builds the objective that will be removed.
+         *
+         * @return an objective.
+         */
+        Objective remove();
+
+        /**
+         * Builds the objective that will be added.
+         * The context will be used to notify the calling application.
+         *
+         * @param context an objective context
+         * @return an objective
+         */
+        Objective add(ObjectiveContext context);
+
+        /**
+         * Builds the objective that will be removed.
+         * The context will be used to notify the calling application.
+         *
+         * @param context an objective context
+         * @return an objective
+         */
+        Objective remove(ObjectiveContext context);
+    }
 }