checkstyle: enable SummaryJavadoc
[neutron.git] / northbound-api / src / main / java / org / opendaylight / neutron / northbound / api / NeutronSecurityRulesNorthbound.java
index 2cca389c7763097a2abe9edcbc52c8ea6ced367e..717a70fa1b16ec915dfeda92514387d9973f12cb 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.neutron.northbound.api;
 
 import java.net.HttpURLConnection;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
@@ -31,6 +30,7 @@ import org.opendaylight.neutron.spi.NeutronSecurityRule;
 /**
  * Neutron Northbound REST APIs for Security Rule.<br>
  * This class provides REST APIs for managing neutron Security Rule
+ *
  * <p>
  * <br>
  * <br>
@@ -46,7 +46,7 @@ import org.opendaylight.neutron.spi.NeutronSecurityRule;
  */
 
 @Path("/security-group-rules")
-public class NeutronSecurityRulesNorthbound
+public final class NeutronSecurityRulesNorthbound
         extends AbstractNeutronNorthbound<NeutronSecurityRule, NeutronSecurityRuleRequest, INeutronSecurityRuleCRUD> {
     private static final String RESOURCE_NAME = "Security Rule";
 
@@ -56,7 +56,7 @@ public class NeutronSecurityRulesNorthbound
     }
 
     /**
-     * Returns a list of all Security Rules
+     * Returns a list of all Security Rules.
      */
     @GET
     @Produces({ MediaType.APPLICATION_JSON })
@@ -84,9 +84,7 @@ public class NeutronSecurityRulesNorthbound
         INeutronSecurityRuleCRUD securityRuleInterface = getNeutronCRUD();
         List<NeutronSecurityRule> allSecurityRules = securityRuleInterface.getAll();
         List<NeutronSecurityRule> ans = new ArrayList<>();
-        Iterator<NeutronSecurityRule> i = allSecurityRules.iterator();
-        while (i.hasNext()) {
-            NeutronSecurityRule nsr = i.next();
+        for (NeutronSecurityRule nsr : allSecurityRules) {
             if ((querySecurityRuleUUID == null || querySecurityRuleUUID.equals(nsr.getID()))
                     && (querySecurityRuleDirection == null
                             || querySecurityRuleDirection.equals(nsr.getSecurityRuleDirection()))
@@ -116,7 +114,7 @@ public class NeutronSecurityRulesNorthbound
     }
 
     /**
-     * Returns a specific Security Rule
+     * Returns a specific Security Rule.
      */
 
     @Path("{securityRuleUUID}")
@@ -134,7 +132,7 @@ public class NeutronSecurityRulesNorthbound
     }
 
     /**
-     * Creates new Security Rule
+     * Creates new Security Rule.
      */
 
     @POST
@@ -147,7 +145,7 @@ public class NeutronSecurityRulesNorthbound
     }
 
     /**
-     * Updates a Security Rule
+     * Updates a Security Rule.
      */
 
     @Path("{securityRuleUUID}")
@@ -163,7 +161,7 @@ public class NeutronSecurityRulesNorthbound
     }
 
     /**
-     * Deletes a Security Rule
+     * Deletes a Security Rule.
      */
 
     @Path("{securityRuleUUID}")