All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.att.research.xacml.std.StdResponse Maven / Gradle / Ivy

/*
 *                        AT&T - PROPRIETARY
 *          THIS FILE CONTAINS PROPRIETARY INFORMATION OF
 *        AT&T AND IS NOT TO BE DISCLOSED OR USED EXCEPT IN
 *             ACCORDANCE WITH APPLICABLE AGREEMENTS.
 *
 *          Copyright (c) 2013 AT&T Knowledge Ventures
 *              Unpublished and Not for Publication
 *                     All Rights Reserved
 */
package com.att.research.xacml.std;

import java.util.Collection;

import com.att.research.xacml.api.Response;
import com.att.research.xacml.api.Result;
import com.att.research.xacml.util.Wrapper;

/**
 * Immutable implementation of the {@link com.att.research.xacml.api.Response} interface.
 * 
 * @author Christopher A. Rath
 * @version $Revision$
 */
public class StdResponse extends Wrapper implements Response {
	/**
	 * Creates an immutable StdResponse wrapping the given {@link com.att.research.xacml.api.Response}.
	 * 
	 * @param response the Response to wrap in the new StdResponse
	 */
	public StdResponse(Response response) {
		super(response);
	}
	
	/**
	 * Creates a new StdResponse with the single given {@link com.att.research.xacml.api.Result}.
	 * 
	 * @param result the Result for the new StdResponse.
	 */
	public StdResponse(Result result) {
		this(new StdMutableResponse(result));
	}
	
	/**
	 * Creates a new StdResponse with a copy of the {@link com.att.research.xacml.api.Result}s in the given Collection.
	 * 
	 * @param listResults the Collection of Results to copy
	 */
	public StdResponse(Collection listResults) {
		this(new StdMutableResponse(listResults));
	}
	
	@Override
	public Collection getResults() {
		return this.getWrappedObject().getResults();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy