public static int fieldHashCode ( HollowObjectTypeDataAccess typeAccess , int ordinal , int fieldPosition ) { HollowObjectSchema schema = typeAccess . getSchema ( ) ; switch ( schema . getFieldType ( fieldPosition ) ) { case BOOLEAN : Boolean bool = typeAccess . readBoolean ( ordinal , fieldPosition ) ; return booleanHashCode ( bool ) ; case BYTES : case STRING : return typeAccess . findVarLengthFieldHashCode ( ordinal , fieldPosition ) ; case DOUBLE : double d = typeAccess . readDouble ( ordinal , fieldPosition ) ; return doubleHashCode ( d ) ; case FLOAT : float f = typeAccess . readFloat ( ordinal , fieldPosition ) ; return floatHashCode ( f ) ; case INT : return intHashCode ( typeAccess . readInt ( ordinal , fieldPosition ) ) ; case LONG : long l = typeAccess . readLong ( ordinal , fieldPosition ) ; return longHashCode ( l ) ; case REFERENCE : return typeAccess . readOrdinal ( ordinal , fieldPosition ) ; } throw new IllegalStateException ( "I don't know how to hash a " + schema . getFieldType ( fieldPosition ) ) ; }
Hash a field in an OBJECT record .