private String normalizeTypeValue(String type){
  if (INSERT.equals(type))   return INSERT;
  if (REMOVE.equals(type))   return REMOVE;
  return null;
}

private String normalizeTypeValue ( String type ) { if ( INSERT . equals ( type ) ) return INSERT ; if ( REMOVE . equals ( type ) ) return REMOVE ; return null ; }
computes the normalized type value to ensure that the implementation can use object identity rather than equality .
