Mercurial > hg > Members > tatsuki > Alice
comparison src/main/java/alice/test/codesegment/local/wordcount/WordConfig.java @ 345:8f71c3e6f11d
Change directory structure Maven standard
author | sugi |
---|---|
date | Wed, 16 Apr 2014 18:26:07 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
344:9f97ec18f8c5 | 345:8f71c3e6f11d |
---|---|
1 package alice.test.codesegment.local.wordcount; | |
2 | |
3 public class WordConfig { | |
4 public String filename; | |
5 public static String[] array; | |
6 public int division = 16; | |
7 | |
8 public WordConfig(String[] args) { | |
9 for (int i=0;i<args.length; i++){ | |
10 if ("-f".equals(args[i])){ | |
11 filename = args[++i]; | |
12 } else if ("-d".equals(args[i])){ | |
13 division = Integer.parseInt(args[++i]); | |
14 } | |
15 } | |
16 | |
17 if (filename==null){ | |
18 System.out.println("Usage: WordCount -f FILENAME"); | |
19 System.exit(0); | |
20 } | |
21 } | |
22 | |
23 } |