private Object search ( Collection < ? > collection , String hashKey ) { int hash = Integer . valueOf ( hashKey ) ; for ( Object o : collection ) { if ( o . hashCode ( ) == hash ) return o ; } //nothing found return null ; }
Linear collection search by hashcode