001    package cnslab.cnsnetwork;
002    
003    import java.util.*;
004    
005    /***********************************************************************
006    * Combination of Vector components 
007    * 
008    * @version
009    *   $Date: 2012-08-04 13:43:22 -0500 (Sat, 04 Aug 2012) $
010    *   $Rev: 104 $
011    *   $Author: croft $
012    * @author
013    *   Yi Dong
014    * @author
015    *   David Wallace Croft
016    ***********************************************************************/
017    public final class  VComponents
018    ////////////////////////////////////////////////////////////////////////
019    ////////////////////////////////////////////////////////////////////////
020    {
021    
022    public ArrayList<VComponent>  coms;
023    
024    ////////////////////////////////////////////////////////////////////////
025    ////////////////////////////////////////////////////////////////////////
026    
027    public  VComponents ( )
028    ////////////////////////////////////////////////////////////////////////
029    {
030      coms = new ArrayList<VComponent> ( );
031    }
032
033    ////////////////////////////////////////////////////////////////////////
034    ////////////////////////////////////////////////////////////////////////
035
036    /***********************************************************************
037    * Add one component.
038    ***********************************************************************/
039    public void  addCom (
040      final Layer  layer,
041      final int    orientation )
042    ////////////////////////////////////////////////////////////////////////
043    {
044      coms.add ( new VComponent ( layer, orientation ) );
045    }
046
047    @Override
048    public String  toString ( )
049    ////////////////////////////////////////////////////////////////////////
050    {
051      String out="";
052      
053      for(int i=0; i< coms.size(); i++)
054      {
055        out=out+coms.get(i).toString()+"\n";
056      }
057      
058      return out;
059    }
060
061    ////////////////////////////////////////////////////////////////////////
062    ////////////////////////////////////////////////////////////////////////
063    }