MSortedCollectionTest.java
Go to the documentation of this file.
00001 /*
00002  * (c) copyright 2008, Technische Universitaet Graz and Technische Universitaet Wien
00003  *
00004  * This file is part of jdiagengine.
00005  *
00006  * jdiagengine is free software: you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation, either version 3 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * jdiagengine is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * You should have received a copy of the GNU General Public License
00016  * along with jdiagengine. If not, see <http://www.gnu.org/licenses/>.
00017  *
00018  * Authors: Joerg Weber, Franz Wotawa
00019  * Contact: jweber@ist.tugraz.at (preferred), or fwotawa@ist.tugraz.at
00020  *
00021  */
00022 
00023 
00024 package utils;
00025 
00026 import java.util.*;
00027 
00028 public class MSortedCollectionTest
00029 {
00030 
00031     public static void main (String[] args) {
00032         MSortedCollection col = new MSortedCollection();
00033         MSortedInteger i;
00034 
00035         i = new MSortedInteger(10);
00036         col.addElement(i);
00037 
00038         i = new MSortedInteger(9);
00039         col.addElement(i);
00040 
00041         i = new MSortedInteger(11);
00042         col.addElement(i);
00043 
00044         i = new MSortedInteger(1);
00045         col.addElement(i);
00046 
00047         i = new MSortedInteger(1);
00048         col.addElement(i);
00049 
00050         Iterator e = col.elements();
00051         MSortedInteger obj;
00052         System.out.println("TEST " + ((new Integer(col.size())).toString()));
00053         while (e.hasNext()) {
00054             obj = (MSortedInteger)e.next();
00055             System.out.println(obj.toString());
00056         }
00057 
00058         e = col.elementsInverse();
00059         System.out.println("TEST2 " + ((new Integer(col.size())).toString()));
00060         while (e.hasNext()) {
00061             obj = (MSortedInteger)e.next();
00062             System.out.println(obj.toString());
00063         }
00064 
00065     }
00066 
00067 }


tug_ist_diagnosis_engine
Author(s): Safdar Zaman, Gerald Steinbauer
autogenerated on Mon Jan 6 2014 11:51:16