cz/vutbr/fit/dudka/SGVis/Data/RelationList.java

Go to the documentation of this file.
00001 package cz.vutbr.fit.dudka.SGVis.Data;
00002 
00003 import java.util.ArrayList;
00004 import java.util.Iterator;
00005 
00009 public class RelationList implements
00010   Cloneable,
00011   IContainer<Relation>
00012 {
00013   private ArrayList<Relation> list;
00014   
00015   public RelationList() {
00016      list = new ArrayList<Relation>();
00017   }
00018   
00023   public RelationList(RelationList ref) {
00024     list = new ArrayList<Relation>(ref.list);
00025   }
00026   
00027   public Iterator<Relation> iterator() {
00028     return list.iterator();
00029   }
00030   
00031   public void add(Relation relation) {
00032     list.add(relation);
00033   }
00034 
00039   public void add(IContainer<Relation> container) {
00040     for (Relation rel: container)
00041       this.add(rel);
00042   }
00043   
00047   public RelationList clone() throws CloneNotSupportedException {
00048     return new RelationList(this);
00049   }
00050 }

Generated on Sat May 3 22:56:09 2008 for SGVis by  doxygen 1.5.4