mirror of
https://github.com/processing/processing4.git
synced 2026-01-25 17:31:07 +01:00
Discontinued use of string import statement generation and migrated to pdex's ImportStatement class which can keep track of if the import is static or not. This allows static imports to be handled correctly in PDEX, JavaBuild library resoluation, and actual Java compilation step. Resolves https://github.com/processing/processing/issues/5577 and https://github.com/processing/processing4/issues/16 but only in the Processing4 branch.
63 lines
1.6 KiB
Plaintext
63 lines
1.6 KiB
Plaintext
import processing.core.*;
|
|
import processing.data.*;
|
|
import processing.event.*;
|
|
import processing.opengl.*;
|
|
|
|
import static java.lang.Math.tanh;
|
|
import java.util.concurrent.Callable;
|
|
import java.util.List;
|
|
import java.util.Comparator;
|
|
import java.util.Map;
|
|
import java.util.Collection;
|
|
import java.util.Arrays;
|
|
import java.util.HashSet;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.ArrayList;
|
|
import java.io.File;
|
|
import java.io.BufferedReader;
|
|
import java.io.PrintWriter;
|
|
import java.io.InputStream;
|
|
import java.io.OutputStream;
|
|
import java.io.IOException;
|
|
|
|
public class bug598 extends PApplet {
|
|
|
|
// java 5 torture test
|
|
|
|
private static Comparator<String> rotarapmoc = new Comparator<String>() {
|
|
public int compare(final String o1, final String o2)
|
|
{
|
|
return o1.charAt(o1.length() - 1) - o2.charAt(o2.length() - 1);
|
|
}
|
|
};
|
|
|
|
public final <T> void printClass(T t) {
|
|
println(t.getClass());
|
|
}
|
|
|
|
public final List<String> sortem(final String... strings) {
|
|
Arrays.sort(strings, rotarapmoc);
|
|
return Arrays.asList(strings);
|
|
}
|
|
|
|
final Map<String, Collection<Integer>>
|
|
charlesDeGaulle = new HashMap<String, Collection<Integer>>();
|
|
|
|
public void setup() {
|
|
charlesDeGaulle.put("banana", new HashSet<Integer>());
|
|
charlesDeGaulle.get("banana").add(0);
|
|
System.out.println(sortem("aztec", "maya", "spanish", "portuguese"));
|
|
printClass(12.d);
|
|
}
|
|
|
|
static public void main(String[] passedArgs) {
|
|
String[] appletArgs = new String[] { "bug598" };
|
|
if (passedArgs != null) {
|
|
PApplet.main(concat(appletArgs, passedArgs));
|
|
} else {
|
|
PApplet.main(appletArgs);
|
|
}
|
|
}
|
|
}
|