-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApply.java
More file actions
27 lines (25 loc) · 838 Bytes
/
Copy pathApply.java
File metadata and controls
27 lines (25 loc) · 838 Bytes
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
26
27
/**
* Created by theartiste on 1/3/16.
*/
public class Apply {
public static void process(Processor p, Object s) {
System.out.println("Using processor : " + p.name());
System.out.println(p.process(s));
}
public static String s = "Disagreement with beliefs is by definition incorrect.";
public static void main(String[] args) {
String str = "loved";
process(new Upcase(), s);
process(new DownCase(), s);
process(new Splitter(), s);
process(new SwapChar(), str);
for (int i = 0; i < 10; i++) {
if (i < 5) {
process(new LowPass(1.0), new Waveform());
} else {
process(new HighPass(1.0), new Waveform());
process(new BandPass(1.0, 3.4), new Waveform());
}
}
}
}