a java-like collections framework in javascript