Metrics filter java

Creates a Java version.