Converting MatchRule to java, and removing unused enums.
Converting 'Network' from Groovy to Java.