%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
com.wikihouse.wildcats0201.jdbcchart.fsutil.DirectoryFactory$DirectoryImpl |
|
|
1 | package com.wikihouse.wildcats0201.jdbcchart.fsutil; |
|
2 | ||
3 | import java.io.File; |
|
4 | import java.util.Arrays; |
|
5 | import java.util.Iterator; |
|
6 | ||
7 | /** |
|
8 | * <B>DirectoryFactory </B>. ディレクトリのFactoryです。 |
|
9 | * |
|
10 | * @author $Author: wildcats $ |
|
11 | * @version $Revision: 5 $ |
|
12 | */ |
|
13 | public final class DirectoryFactory { |
|
14 | ||
15 | private DirectoryFactory() { |
|
16 | } |
|
17 | ||
18 | /** |
|
19 | * 生成. |
|
20 | * |
|
21 | * @param path |
|
22 | * パス |
|
23 | * @return Directory |
|
24 | */ |
|
25 | public static Directory create(String path) { |
|
26 | return new DirectoryImpl(path); |
|
27 | } |
|
28 | ||
29 | private static class DirectoryImpl implements Directory { |
|
30 | ||
31 | 6 | private final String path; |
32 | 6 | |
33 | 9 | public DirectoryImpl(String path) { |
34 | 3 | this.path = path; |
35 | 3 | } |
36 | ||
37 | /** |
|
38 | * @see com.wikihouse.wildcats0201.jdbcchart.fsutil.Directory#make() |
|
39 | 6 | */ |
40 | 26 | public void make() { |
41 | 23 | PathSpliter pathSpliter = PathSpliterFactory.create(this.path); |
42 | 17 | for (Iterator it = Arrays.asList(pathSpliter.split()).iterator(); it |
43 | 24 | .hasNext();) { |
44 | 7 | String path = ((Path) it.next()).getPath(); |
45 | 13 | new File(path).mkdir(); |
46 | } |
|
47 | 3 | } |
48 | ||
49 | } |
|
50 | ||
51 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |