java docs and multi-threading

Added java docs and implemented parallel streams for multithreading