package entity;

import boundary.*;
import java.util.Collection;
import java.util.Iterator;
public class PortfolioRiskEvaluator {

		
	
	/*
	 * (non-javadoc)
	 */
	private double portfolioReturn;
	 
		
		/**
		 * Getter of the property <tt>portfolioReturn</tt>
		 * @return Returns the portfolioReturn. 
		*/
		public double getPortfolioReturn(){
		return portfolioReturn;
			 }
	
	/**
	 * Setter of the property <tt>portfolioReturn</tt>
	 *
	 * @param portfolioReturn The portfolioReturn to set.
	 *
	 */
	public void setPortfolioReturn(double portfolioReturn ){
		this.portfolioReturn = portfolioReturn;
	}

		
	
	/*
	 * (non-javadoc)
	 */
	private double portfolioRisk;
	 
	/**
	 * Getter of the property <tt>portfolioRisk</tt>
	 *
	 * @return Returns the portfolioRisk.
	 * 
	 */
	public double getPortfolioRisk()
	{
		return portfolioRisk;
	}
	
	/**
	 * Setter of the property <tt>portfolioRisk</tt>
	 *
	 * @param portfolioRisk The portfolioRisk to set.
	 *
	 */
	public void setPortfolioRisk(double portfolioRisk ){
		this.portfolioRisk = portfolioRisk;
	}

		
	
	/*
	 * (non-javadoc)
	 */
	private double sharpeRatio;
	 
	/**
	 * Getter of the property <tt>sharpeRatio</tt>
	 *
	 * @return Returns the sharpeRatio.
	 * 
	 */
	public double getSharpeRatio()
	{
		return sharpeRatio;
	}
	
	/**
	 * Setter of the property <tt>sharpeRatio</tt>
	 *
	 * @param sharpeRatio The sharpeRatio to set.
	 *
	 */
	public void setSharpeRatio(double sharpeRatio ){
		this.sharpeRatio = sharpeRatio;
	}

		
		public void GetNextStock(){
		
		}


			
	
	/*
	 * (non-javadoc)
	 */
	private long InvestorID;
	 
	/**
	 * Getter of the property <tt>InvestorID</tt>
	 *
	 * @return Returns the InvestorID.
	 * 
	 */
	public long getInvestorID()
	{
		return InvestorID;
	}
	
	/**
	 * Setter of the property <tt>InvestorID</tt>
	 *
	 * @param InvestorID The InvestorID to set.
	 *
	 */
	public void setInvestorID(long InvestorID ){
		this.InvestorID = InvestorID;
	}

		
		public double CalculateSharpeRatio(){
			return 0;
		
		}


			
	
	/*
	 * (non-javadoc)
	 */
	private DatabaseCommunicator databaseCommunicator = null;
	 
	/**
	 * Getter of the property <tt>databaseCommunicator</tt>
	 *
	 * @return Returns the databaseCommunicator.
	 * 
	 */
	public DatabaseCommunicator getDatabaseCommunicator()
	{
		return databaseCommunicator;
	}
	
	/**
	 * Setter of the property <tt>databaseCommunicator</tt>
	 *
	 * @param databaseCommunicator The databaseCommunicator to set.
	 *
	 */
	public void setDatabaseCommunicator(DatabaseCommunicator databaseCommunicator ){
		this.databaseCommunicator = databaseCommunicator;
	}

		
	
	/*
	 * (non-javadoc)
	 */
	private Covariance covariance;
	 
	/**
	 * Getter of the property <tt>covaiance</tt>
	 *
	 * @return Returns the covaiance.
	 * 
	 */
	public Covariance getCovariance()
	{
		return covariance;
	}
	
	/**
	 * Setter of the property <tt>covaiance</tt>
	 *
	 * @param covaiance The covariance to set.
	 *
	 */
	public void setCovariance(Covariance covariance ){
		this.covariance = covariance;
	}

		
	/**
	 *
	 */
	private Collection<StockRiskEvaluator> stockClass;
	
	/**
	 * Getter of the property <tt>stockClass</tt>
	 *
	 * @return Returns the stockClass.
	 * 
	 */
	public Collection<StockRiskEvaluator> getStockClass()
	{
		return stockClass;
	}
	 
	/**
	 * Returns an iterator over the elements in this collection. 
	 *
	 * @return an <tt>Iterator</tt> over the elements in this collection
	 * @see	java.util.Collection#iterator()
	 * 
	 */
	public Iterator<StockRiskEvaluator> stockClassIterator(){
		return stockClass.iterator();
	}
	
	/**
	 * Returns <tt>true</tt> if this collection contains no elements.
	 *
	 * @return <tt>true</tt> if this collection contains no elements
	 * @see	java.util.Collection#isEmpty()
	 *
	 */
	public boolean isStockClassEmpty(){
		return stockClass.isEmpty();
	}
	
	/**
	 * Returns <tt>true</tt> if this collection contains the specified element. 
	 *
	 * @param element whose presence in this collection is to be tested.
	 * @see	java.util.Collection#contains(Object)
	 *
	 */
	public boolean containsStockClass(StockRiskEvaluator StockRiskEvaluator){
		return stockClass.contains(StockRiskEvaluator);
	}
	
	/**
	 * Returns <tt>true</tt> if this collection contains all of the elements
	 * in the specified collection.
	 *
	 * @param elements collection to be checked for containment in this collection.
	 * @see	java.util.Collection#containsAll(Collection)
	 *
	 */
	public boolean containsAllStockClass(Collection<StockRiskEvaluator> stockClass){
		return this.stockClass.containsAll(stockClass);
	}
	
	/**
	 * Returns the number of elements in this collection.
	 *
	 * @return the number of elements in this collection
	 * @see	java.util.Collection#size()
	 *
	 */
	public int stockClassSize(){
		return stockClass.size();
	}
	
	/**
	 * Returns all elements of this collection in an array.
	 *
	 * @return an array containing all of the elements in this collection
	 * @see	java.util.Collection#toArray()
	 *
	 */
	public StockRiskEvaluator[] stockClassToArray(){
		return stockClass.toArray(new StockRiskEvaluator[stockClass.size()]);
	}
	
	
	/**
	 * Ensures that this collection contains the specified element (optional
	 * operation). 
	 *
	 * @param element whose presence in this collection is to be ensured.
	 * @see	java.util.Collection#add(Object)
	 *
	 */
	public boolean addStockClass(StockRiskEvaluator StockRiskEvaluator){
		return stockClass.add(StockRiskEvaluator);
	}
	
	/**
	 * Setter of the property <tt>stockClass</tt>
	 *
	 * @param stockClass the stockClass to set.
	 *
	 */
	public void setStockClass(Collection<StockRiskEvaluator> stockClass){
		this.stockClass = stockClass;
	}
	
	/**
	 * Removes a single instance of the specified element from this
	 * collection, if it is present (optional operation).
	 *
	 * @param element to be removed from this collection, if present.
	 * @see	java.util.Collection#add(Object)
	 *
	 */
	public boolean removeStockClass(StockRiskEvaluator StockRiskEvaluator){
		return stockClass.remove(StockRiskEvaluator);
	}
	
	/**
	 * Removes all of the elements from this collection (optional operation).
	 *
	 * @see	java.util.Collection#clear()
	 *
	 */
	public void clearStockClass(){
		stockClass.clear();
	}
	
		
		

}

///**
//	 * Getter of the property <tt>portfolioReturn</tt>
//	 *
//	 * @return Returns the portfolioReturn.
//	 * 
//	 */
//	public String getPortfolioReturn()
//	{
//		return portfolioReturn;
//	}
///**
//	 * Setter of the property <tt>portfolioReturn</tt>
//	 *
//	 * @param portfolioReturn The portfolioReturn to set.
//	 *
//	 */
//	public void setPortfolioReturn(String portfolioReturn ){
//		this.portfolioReturn = portfolioReturn;
//	}
///**
//	 * Getter of the property <tt>portfolioRisk</tt>
//	 *
//	 * @return Returns the portfolioRisk.
//	 * 
//	 */
//	public String getPortfolioRisk()
//	{
//		return portfolioRisk;
//	}
///**
//	 * Setter of the property <tt>portfolioRisk</tt>
//	 *
//	 * @param portfolioRisk The portfolioRisk to set.
//	 *
//	 */
//	public void setPortfolioRisk(String portfolioRisk ){
//		this.portfolioRisk = portfolioRisk;
//	}
///**
//	 * Setter of the property <tt>sharpeRatio</tt>
//	 *
//	 * @param sharpeRatio The sharpeRatio to set.
//	 *
//	 */
//	public void setSharpeRatio(String sharpeRatio ){
//		this.sharpeRatio = sharpeRatio;
//	}
///**
//	 * Getter of the property <tt>sharpeRatio</tt>
//	 *
//	 * @return Returns the sharpeRatio.
//	 * 
//	 */
//	public String getSharpeRatio()
//	{
//		return sharpeRatio;
//	}
///**
//	 * Setter of the property <tt>stockClass</tt>
//	 *
//	 * @param stockClass The stockClass to set.
//	 *
//	 */
//	public void setStockClass(StockRiskEvaluator stockClass ){
//		this.stockClass = stockClass;
//	}
///**
//	 * Getter of the property <tt>stockClass</tt>
//	 *
//	 * @return Returns the stockClass.
//	 * 
//	 */
//	public StockRiskEvaluator getStockClass()
//	{
//		return stockClass;
//	}
///**
//	 * Setter of the property <tt>covariance</tt>
//	 *
//	 * @param covariance The covariance to set.
//	 *
//	 */
//	public void setcovariance(covariance covariance ){
//		this.covariance = covariance;
//	}
///**
//	 * Getter of the property <tt>covariance</tt>
//	 *
//	 * @return Returns the covariance.
//	 * 
//	 */
//	public covariance getcovariance()
//	{
//		return covariance;
//	}
///**
//	 * Setter of the property <tt>stockClass</tt>
//	 *
//	 * @param stockClass The stockClass to set.
//	 *
//	 */
//	public void setStockClass(StockRiskEvaluator stockClass ){
//		this.stockClass = stockClass;
//	}
///**
//	 * Getter of the property <tt>stockClass</tt>
//	 *
//	 * @return Returns the stockClass.
//	 * 
//	 */
//	public StockRiskEvaluator getStockClass()
//	{
//		return stockClass;
//	}