import java.util.ArrayList;

public class Class_plan 
{

	  private ArrayList<TestPlan>   	wxc;
	  private String          		  label;
	  
	  
	  
	  public Class_plan() 
	    { 
	    	this("", new ArrayList<TestPlan>()); 
	  	}

	    public Class_plan(String aLabel) 
	    { 
	    	this(aLabel, new ArrayList<TestPlan>()); 
	   	}

	    public Class_plan(String aLabel, ArrayList<TestPlan> initialNodes) 
	    {
	        label = aLabel;
	        wxc = initialNodes;
	    }
	  
	  
	  //public Class_plan() 
	  //{ 
	//	  this.wxc = new ArrayList<TestPlan>(); 
	 // }
	  
	  public void addSequence(TestPlan obj) 
	  {
	      wxc.add(obj);
	      System.out.println("ajout...");
	  }
	  
	  public void deleteNode(TestPlan obj) 
	  {
		  wxc.remove(obj);  
	  }
	  
	  public ArrayList<TestPlan> getTreeElement() 
	  { 
		  return wxc; 
	  }
	  
	  public TestPlan GetSequenceNamed(String aSequence) 
	  {
	        for (TestPlan n:  wxc)
	        {	
	            if (n.getSequence().equals(aSequence))  return n;
	        }    

	        return null;  
	 }
	 
	
	 public ArrayList<TestPlan> getTreeChild() { return wxc; }

	 
	
}
