Documentation
Added an implementation in Java