Sure. Here's a link showing all of the Processing constants:
http://dev.processing.org/reference/core/javadoc/processing/core/PConstants.html
The constants used in the filter method are all of the type "static final int" (as opposed to the newer Java enum types). Here's the (developer) documentation for PApplet.filter():
http://dev.processing.org/reference/core/javadoc/processing/core/PApplet.html#fi...It shows that filter() just takes an int as the first parameter: "public void filter(int kind)" or "public void filter(int kind, float param)". When you pass "MULTIPLY" to filter(), for example, you're just passing it a predefined integer.
If you wanted to make an array containing the different integers that correspond to the filter modes, you just use an array of integers:
Code:int[] modes = new int[8];
modes[0] = THRESHOLD;
modes[1] = GRAY;
modes[2] = INVERT;
modes[3] = POSTERIZE;
modes[4] = BLUR;
modes[5] = OPAQUE;
modes[6] = ERODE;
modes[7] = DILATE;
int randomIndex = int(random(0, modes.length));
int randomMode = modes[randomIndex];
You can then use "randomMode" as the first argument when you call filter().
I still think your solution is better, because it's likely that you'd want to pass filter() a different second argument ("level") depending on which mode is randomly chosen. It's easier to do that with a switch statement.