blob: 1fcab1738aac07527fa886c50243cbb175779b30 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package net.tuschhcm.routercontrol;
import java.io.File;
import java.util.Map;
/**
* Utility to print out the preset file in a nice readable form.
*/
public class PrintPresets {
public static void main(String... args) throws Exception {
Map<Integer, Preset> ps = Preset.loadPresetsFile(new File("presets.txt"));
for (Map.Entry<Integer, Preset> entry : ps.entrySet()) {
final Preset p = entry.getValue();
System.out.printf("Preset %3d. %-20s",
entry.getKey(), p.getName());
for (int i = 1; i <= p.getNumberOfOutputs(); i++) {
System.out.printf("%3d", p.getInputForOutput(i));
}
System.out.println();
}
}
}
|