package org.gcube.dataanalysis.dataminer.poolmanager.datamodel;

import java.util.Collection;
import java.util.Vector;

public class AlgorithmSet ***REMOVED***

  private String name;

  private Collection<Algorithm> algorithms;

  public AlgorithmSet() ***REMOVED***
    this.algorithms = new Vector<>();
  ***REMOVED***

  public String getName() ***REMOVED***
    return name;
  ***REMOVED***

  public void setName(String name) ***REMOVED***
    this.name = name;
  ***REMOVED***

  public Collection<Algorithm> getAlgorithms() ***REMOVED***
    return new Vector<>(algorithms);
  ***REMOVED***

  public void addAlgorithm(Algorithm algoritm) ***REMOVED***
    this.algorithms.add(algoritm);
  ***REMOVED***

  public Boolean hasAlgorithm(Algorithm algorithm) ***REMOVED***
    for (Algorithm a : this.algorithms) ***REMOVED***
      if (a.getName().equals(algorithm.getName())) ***REMOVED***
        return true;
      ***REMOVED***
    ***REMOVED***
    return false;
  ***REMOVED***
  
  public String toString() ***REMOVED***
    String out = "ALGOSET: " + this.name + "\n";
    for(Algorithm a:this.algorithms) ***REMOVED***
      out+=a+"\n";
    ***REMOVED***
    return out;
  ***REMOVED***

***REMOVED***
