Merge "Fix checkstyle api.openflow.md.util" into stable/boron
authorAnil Vishnoi <vishnoianil@gmail.com>
Fri, 14 Apr 2017 23:03:00 +0000 (23:03 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 14 Apr 2017 23:03:00 +0000 (23:03 +0000)
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/util/OpenflowVersion.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/util/PollableQueuesPriorityZipper.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/md/util/PollableQueuesZipper.java

index 01c269d11df6b3a3df33935fb39b6c9d5d9c6347..99d7cc8d0043b364fd21ec0cc82fcfd3535df593 100644 (file)
@@ -9,12 +9,10 @@
 package org.opendaylight.openflowplugin.api.openflow.md.util;
 
 /**
- * @deprecated enum in api is not something what we would like to see in case it is evolving
- * TODO: remove class for lithium release
- *
- * List of Openflow versions supported by the plugin
- * Note: If you add a version here, make sure to update org.opendaylight.openflowplugin.openflow.md.util.OpenflowPortsUtil as well.
- * Created by kramesha on 5/2/14.
+ * List of Openflow versions supported by the plugin.
+ * Note: If you add a version here,
+ * make sure to update org.opendaylight.openflowplugin.openflow.md.util.OpenflowPortsUtil as well.
+ * @deprecated enum in api is not something what we would like to see in case it is evolving.
  */
 public enum OpenflowVersion {
 
@@ -39,6 +37,7 @@ public enum OpenflowVersion {
     }
 
     /**
+     * Getter.
      * @return the version
      */
     public short getVersion() {
index d853236cee42f657854b0d814acf582a3f793220..55ca10a5700592f6206ef4f82b91edbc68c3f410 100644 (file)
@@ -1,6 +1,6 @@
-/**
+/*
  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- * 
+ *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -16,7 +16,7 @@ import java.util.Queue;
  * still null result, poll will return null. <br>
  * Iterating keeps last position so this polling is supposed to be fairly
  * distributed.
- * 
+ *
  * @param <T> common item type of zipped queues
  */
 public class PollableQueuesPriorityZipper<T> {
@@ -24,25 +24,20 @@ public class PollableQueuesPriorityZipper<T> {
     private Queue<T> prioritizedSource;
     private PollableQueuesZipper<T> zipper;
 
-    /**
-     * default ctor
-     */
     public PollableQueuesPriorityZipper() {
         zipper = new PollableQueuesZipper<>();
     }
 
     /**
-     * Add all member queues before first invocation of
-     * {@link PollableQueuesPriorityZipper#poll()}
-     * 
-     * @param queue
-     *            to be added to group
+     * Add all member queues before first invocation of {@link PollableQueuesPriorityZipper#poll()}.
+     * @param queue to be added to group
      */
     public void addSource(Queue<T> queue) {
         zipper.addSource(queue);
     }
 
     /**
+     * Next common product.
      * @return next common product of polling member groups
      */
     public T poll() {
index 7ba8317607234afd97a10d7b535708e6af437135..c6aca0ef8645f49ef0c9948310277450fb15e36a 100644 (file)
@@ -1,6 +1,6 @@
-/**
+/*
  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- * 
+ *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -15,27 +15,24 @@ import java.util.Queue;
 
 /**
  * Zipper groups together a list of queues and exposes one poll method. Polling iterates through
- * all groups and returns first not-null result of poll method on each queue. If after polling each 
- * grouped queue for one time there is still null result, poll will return null. 
+ * all groups and returns first not-null result of poll method on each queue. If after polling each
+ * grouped queue for one time there is still null result, poll will return null.
  * <br>
  * Iterating keeps last position so this polling is supposed to be fairly distributed.
- * 
+ *
  * @param <T> common item type of zipped queues
  */
 public class PollableQueuesZipper<T> {
-    
+
     private List<Queue<T>> sources;
     private Iterator<Queue<T>> cursor;
-    
-    /**
-     * default ctor
-     */
+
     public PollableQueuesZipper() {
         sources = new ArrayList<>();
     }
-    
+
     /**
-     * Add all member queues before first invocation of {@link PollableQueuesZipper#poll()}
+     * Add all member queues before first invocation of {@link PollableQueuesZipper#poll()}.
      * @param queue to be added to group
      */
     public void addSource(Queue<T> queue) {
@@ -43,6 +40,7 @@ public class PollableQueuesZipper<T> {
     }
 
     /**
+     * Next common product.
      * @return next common product of polling member groups
      */
     public T poll() {
@@ -50,7 +48,7 @@ public class PollableQueuesZipper<T> {
         if (cursor == null) {
             cursor = Iterators.cycle(sources);
         }
-        
+
         Queue<T> queue;
         for (int i = 0; i < sources.size(); i++) {
             queue = cursor.next();
@@ -59,7 +57,7 @@ public class PollableQueuesZipper<T> {
                 break;
             }
         }
-        
+
         return item;
     }
 }