* ONAP Policy API\r
* ================================================================================\r
* Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.\r
+ * Modifications Copyright (C) 2019 Nordix Foundation.\r
* ================================================================================\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
}\r
\r
/**\r
- * Checks if the first element of a list contains data.\r
+ * Checks if the first element of a list of maps contains data.\r
*\r
- * @param list list to be examined\r
+ * @param listOfMapsToCheck list of maps to be examined\r
* @return {@code true} if the list contains data, {@code false} otherwise\r
*/\r
- protected <T> boolean hasData(List<Map<String, T>> list) {\r
+ protected <T> boolean hasData(List<Map<String, T>> listOfMapsToCheck) {\r
\r
- return (list != null && !list.isEmpty() && !list.get(0).isEmpty());\r
+ return (listOfMapsToCheck != null && !listOfMapsToCheck.isEmpty() && !listOfMapsToCheck.get(0).isEmpty());\r
+ }\r
+\r
+\r
+ /**\r
+ * Checks if a maps contains data.\r
+ *\r
+ * @param mapToCheck map to be examined\r
+ * @return {@code true} if the list contains data, {@code false} otherwise\r
+ */\r
+ protected <T> boolean hasData(Map<String, T> mapToCheck) {\r
+\r
+ return (mapToCheck != null && !mapToCheck.isEmpty());\r
}\r
\r
/**\r
return "could not find policy with ID " + policyId + " and type "\r
+ policyType.getName() + ":" + policyType.getVersion() + " deployed in any pdp group";\r
}\r
-}
\ No newline at end of file
+}\r