Extract common ID generation logic using IdBlockAllocator

- Define IdGenerator<T> interface
- Implement AbstractIdBlockAllocatorBasedIdGenerator<T>, which
  has the common logic for the existing IntentId, FlowId, MatchActionId,
  and MatchActionOperationsId generator implementations.

Change-Id: I7aeea249df1710719760ed477bffe62853577e0f
diff --git a/src/main/java/net/onrc/onos/core/newintent/MultiPointToSinglePointIntentCompiler.java b/src/main/java/net/onrc/onos/core/newintent/MultiPointToSinglePointIntentCompiler.java
index eb31457..e5a9d25 100644
--- a/src/main/java/net/onrc/onos/core/newintent/MultiPointToSinglePointIntentCompiler.java
+++ b/src/main/java/net/onrc/onos/core/newintent/MultiPointToSinglePointIntentCompiler.java
@@ -1,10 +1,10 @@
 package net.onrc.onos.core.newintent;
 
-import net.onrc.onos.api.flowmanager.FlowIdGenerator;
+import net.onrc.onos.api.flowmanager.FlowId;
 import net.onrc.onos.api.flowmanager.SingleDstTreeFlow;
 import net.onrc.onos.api.flowmanager.Tree;
 import net.onrc.onos.api.newintent.Intent;
-import net.onrc.onos.api.newintent.IntentIdGenerator;
+import net.onrc.onos.api.newintent.IntentId;
 import net.onrc.onos.api.newintent.MultiPointToSinglePointIntent;
 import net.onrc.onos.core.intent.ConstrainedBFSTree;
 import net.onrc.onos.core.intent.Path;
@@ -13,6 +13,7 @@
 import net.onrc.onos.core.topology.BaseTopology;
 import net.onrc.onos.core.topology.ITopologyService;
 import net.onrc.onos.core.topology.Switch;
+import net.onrc.onos.core.util.IdGenerator;
 import net.onrc.onos.core.util.SwitchPort;
 
 import java.util.Arrays;
@@ -37,8 +38,8 @@
      * @param flowIdGenerator flow ID generator
      * @param topologyService topology service
      */
-    public MultiPointToSinglePointIntentCompiler(IntentIdGenerator intentIdGenerator,
-                                                 FlowIdGenerator flowIdGenerator,
+    public MultiPointToSinglePointIntentCompiler(IdGenerator<IntentId> intentIdGenerator,
+                                                 IdGenerator<FlowId> flowIdGenerator,
                                                  ITopologyService topologyService) {
         super(intentIdGenerator, flowIdGenerator);
         this.topologyService = checkNotNull(topologyService);