void addFieldValue(Map<TemporalField,Long> fieldValues,ChronoField field,long value){
  Long old=fieldValues.get(field);
  if (old != null && old.longValue() != value) {
    throw new DateTimeException("Conflict found: " + field + " "+ old+ " differs from "+ field+ " "+ value);
  }
  fieldValues.put(field,value);
}

void addFieldValue ( Map < TemporalField , Long > fieldValues , ChronoField field , long value ) { Long old = fieldValues . get ( field ) ; if ( old != null && old . longValue ( ) != value ) { throw new DateTimeException ( "Conflict found: " + field + " " + old + " differs from " + field + " " + value ) ; } fieldValues . put ( field , value ) ; }
adds a field - value pair to the map , checking for conflicts . < p > if the field is not already present , then the field - value pair is added to the map . if the field is already present and it has the same value as that specified , no action occurs . if the field is already present and it has a different value to that specified , then an exception is thrown .
