/** Constructor. This version will not be used in Data Router R1 since we will not have advice and obligations.\r
*\r
* @param authorized flag indicating whether the response carried a permit response (<code>true</code>)\r
- * or something else (<code>false</code>).\r
+ * or something else (<code>false</code>).\r
* @param advice list of advice elements returned in the response.\r
* @param obligations list of obligation elements returned in the response.\r
*/\r
- public AuthRespImpl(boolean authorized, List<AuthorizationResponseSupplement> advice, List<AuthorizationResponseSupplement> obligations) {\r
+ private AuthRespImpl(boolean authorized, List<AuthorizationResponseSupplement> advice,\r
+ List<AuthorizationResponseSupplement> obligations) {\r
this.authorized = authorized;\r
- this.advice = (advice == null ? null : new ArrayList<AuthorizationResponseSupplement> (advice));\r
- this.obligations = (obligations == null ? null : new ArrayList<AuthorizationResponseSupplement> (obligations));\r
+ this.advice = (advice == null ? null : new ArrayList<>(advice));\r
+ this.obligations = (obligations == null ? null : new ArrayList<>(obligations));\r
}\r
\r
/** Constructor. Simple version for authorization responses that have no advice and no obligations.\r
*\r
- * @param authorized flag indicating whether the response carried a permit (<code>true</code>) or something else (<code>false</code>).\r
+ * @param authorized flag indicating whether the response carried a permit (<code>true</code>)\r
+ * or something else (<code>false</code>).\r
*/\r
- public AuthRespImpl(boolean authorized) {\r
+ AuthRespImpl(boolean authorized) {\r
this(authorized, null, null);\r
}\r
\r
*/\r
@Override\r
public boolean isAuthorized() {\r
- return authorized;\r
+ return authorized;\r
}\r
\r
/**\r
* Returns any advice elements that were included in the authorization response.\r
*\r
- * @return A list of objects implementing the <code>AuthorizationResponseSupplement</code> interface, with each object representing an\r
- * advice element from the authorization response.\r
+ * @return A list of objects implementing the <code>AuthorizationResponseSupplement</code> interface,\r
+ * with each object representing an advice element from the authorization response.\r
*/\r
@Override\r
public List<AuthorizationResponseSupplement> getAdvice() {\r
- return advice;\r
+ return advice;\r
}\r
\r
/**\r
* Returns any obligation elements that were included in the authorization response.\r
*\r
- * @return A list of objects implementing the <code>AuthorizationResponseSupplement</code> interface, with each object representing an\r
- * obligation element from the authorization response.\r
+ * @return A list of objects implementing the <code>AuthorizationResponseSupplement</code> interface,\r
+ * with each object representing an obligation element from the authorization response.\r
*/\r
@Override\r
public List<AuthorizationResponseSupplement> getObligations() {\r