java benchmark with disjointness annotations
[IRC.git] / Robust / src / Benchmarks / mlp / getpot-java / original / Nominus.java
1 // -*- java -*-
2 //    FILE: Nominus.java
3 //    (C) 2001  Frank R. Schaefer
4 //
5 //    This library is free software; you can redistribute it and/or
6 //    modify it under the terms of the GNU Lesser General Public
7 //    License as published by the Free Software Foundation; either
8 //    version 2.1 of the License, or (at your option) any later version.
9 //
10 //    This library is distributed in the hope that it will be useful,
11 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 //    Lesser General Public License for more details.
14 //
15 //    You should have received a copy of the GNU Lesser General Public
16 //    License along with this library; if not, write to the Free Software
17 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18 //////////////////////////////////////////////////////////////////////////////////////
19 import GetPot.*;
20 import java.lang.String;
21
22 public class Nominus {
23     public static void main(String args []) {
24         GetPot   cl = new GetPot(args, "Nominus");
25
26         // if( cl.size() == 1 || cl.search("--help", "-h") ) print_help();
27
28         // print out all argument that do not start with a minus
29         String  nm = cl.next_nominus();     
30         while( nm != "" ) {
31             System.out.println("[" + nm + "]");
32             nm = cl.next_nominus();     
33         } 
34     
35         System.out.println();
36
37         // now get the whole vector at once
38         String[]   files = cl.nominus_vector();
39         for(int i=0; i<files.length ; i++)
40             System.out.println("<" + files[i] + ">");
41                                 
42     }
43
44     static void print_help() {
45         System.out.println();
46         System.out.println( "Example to use nominus arguments:");
47         System.out.println( "USAGE:");
48         System.out.println( "--help, -h  get some help about this program.");
49         System.out.println();
50         System.out.println( "any option that does not start with '-'");
51         System.out.println( "will be printed on screen twice.");
52         System.out.println();
53         System.exit(0);
54     }
55 }
56
57