java implementations of common algorithms and oo patterns