Beispiel #1
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((descriptors == null) ? 0 : descriptors.hashCode());
   result = prime * result + ((formula == null) ? 0 : formula.hashCode());
   result = prime * result + ((formula_weight == null) ? 0 : formula_weight.hashCode());
   result = prime * result + ((id == null) ? 0 : id.hashCode());
   result = prime * result + ((mon_nstd_flag == null) ? 0 : mon_nstd_flag.hashCode());
   result =
       prime * result
           + ((mon_nstd_parent_comp_id == null) ? 0 : mon_nstd_parent_comp_id.hashCode());
   result = prime * result + ((name == null) ? 0 : name.hashCode());
   result = prime * result + ((one_letter_code == null) ? 0 : one_letter_code.hashCode());
   result = prime * result + ((pdbx_ambiguous_flag == null) ? 0 : pdbx_ambiguous_flag.hashCode());
   result = prime * result + ((pdbx_formal_charge == null) ? 0 : pdbx_formal_charge.hashCode());
   result =
       prime * result
           + ((pdbx_ideal_coordinates_details == null)
               ? 0
               : pdbx_ideal_coordinates_details.hashCode());
   result =
       prime * result
           + ((pdbx_ideal_coordinates_missing_flag == null)
               ? 0
               : pdbx_ideal_coordinates_missing_flag.hashCode());
   result = prime * result + ((pdbx_initial_date == null) ? 0 : pdbx_initial_date.hashCode());
   result =
       prime * result
           + ((pdbx_model_coordinates_db_code == null)
               ? 0
               : pdbx_model_coordinates_db_code.hashCode());
   result =
       prime * result
           + ((pdbx_model_coordinates_details == null)
               ? 0
               : pdbx_model_coordinates_details.hashCode());
   result =
       prime * result
           + ((pdbx_model_coordinates_missing_flag == null)
               ? 0
               : pdbx_model_coordinates_missing_flag.hashCode());
   result = prime * result + ((pdbx_modified_date == null) ? 0 : pdbx_modified_date.hashCode());
   result =
       prime * result + ((pdbx_processing_site == null) ? 0 : pdbx_processing_site.hashCode());
   result = prime * result + ((pdbx_release_status == null) ? 0 : pdbx_release_status.hashCode());
   result = prime * result + ((pdbx_replaced_by == null) ? 0 : pdbx_replaced_by.hashCode());
   result = prime * result + ((pdbx_replaces == null) ? 0 : pdbx_replaces.hashCode());
   result =
       prime * result + ((pdbx_subcomponent_list == null) ? 0 : pdbx_subcomponent_list.hashCode());
   result = prime * result + ((pdbx_synonyms == null) ? 0 : pdbx_synonyms.hashCode());
   result = prime * result + ((pdbx_type == null) ? 0 : pdbx_type.hashCode());
   result = prime * result + ((polymerType == null) ? 0 : polymerType.hashCode());
   result = prime * result + ((residueType == null) ? 0 : residueType.hashCode());
   result = prime * result + (standard ? 1231 : 1237);
   result = prime * result + ((three_letter_code == null) ? 0 : three_letter_code.hashCode());
   result = prime * result + ((type == null) ? 0 : type.hashCode());
   return result;
 }
Beispiel #2
0
  public void setType(String type) {
    this.type = type;

    residueType = ResidueType.getResidueTypeFromString(type);
    if (residueType != null) {
      polymerType = residueType.polymerType;
    }
  }