Transitive closure in Java

This is a Java API implementation of linear transitive closure