Merge "Bug5822:Ensuring that the flowId, is unique for a flow in a table"
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / sal / convertor / ConvertorExecutor.java
index 191ad4bb299ef6067fd7242e332f1abcf689faf1..1e28a5498ddc462eee432faebcae46361d2320e9 100644 (file)
@@ -8,8 +8,10 @@
 
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor;
 
+import java.util.Collection;
 import java.util.Optional;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.ConvertorData;
+import org.opendaylight.yangtools.yang.binding.DataContainer;
 
 public interface ConvertorExecutor {
     /**
@@ -17,20 +19,22 @@ public interface ConvertorExecutor {
      *
      * @param <FROM> the source type
      * @param <TO>   the result type
+     * @param <DATA> the data type
      * @param source the source
+     * @param data   convertor data
      * @return the result (can be empty, if no convertor was found)
      */
-    <FROM, TO> Optional<TO> convert(final FROM source);
+    <FROM extends DataContainer, TO, DATA extends ConvertorData> Optional<TO> convert(final FROM source, final DATA data);
 
     /**
-     * Lookup and use convertor by specified type, then converts source and returns converted result
+     * Lookup and use convertor by specified type, then converts source collection and returns converted result
      *
      * @param <FROM> the source type
      * @param <TO>   the result type
      * @param <DATA> the data type
-     * @param source the source
+     * @param source the source collection
      * @param data   convertor data
      * @return the result (can be empty, if no convertor was found)
      */
-    <FROM, TO, DATA extends ConvertorData> Optional<TO> convert(final FROM source, final DATA data);
+    <FROM extends DataContainer, TO, DATA extends ConvertorData> Optional<TO> convert(final Collection<FROM> source, final DATA data);
 }
\ No newline at end of file