a replication of collection framework in java