Here is a simple example of using a Map for something like what you are doing.
// simple map for rule patterns to their descriptions
Map<String,String> patternMap = new HashMap<String, String>();
patternMap.put("(?i)\\s*[a-zA-Z]+ing\\s*","Ends with 'ing'");
patternMap.put("(?i)\\s*[a-zA-Z]+ly\\s*","Ends with 'ly'");
patternMap.put("(?i)\\s*th[a-zA-Z]+\\s*","Starts with 'th'");
// now let's run this against some text
String someWords = "The early bird can be found eating the worm over there, Billy.";
for (String s : someWords.split("[ ,\\.]") ){
for (String pattern : patternMap.keySet()){
// if we find a match, print it along with its description
if (s.matches(pattern)){
System.out.println(s + ": "+patternMap.get(pattern));
}
}
}