com.regnosys.rosetta.translate.synonymmap.AttributeGroupMapping Maven / Gradle / Ivy
package com.regnosys.rosetta.translate.synonymmap;
public class AttributeGroupMapping {
private final AttributeGroup attrPathSynonymGroup;
private final SynonymMap synonymMappings;
public AttributeGroupMapping(AttributeGroup group, SynonymMap synonymMappings) {
this.attrPathSynonymGroup = group;
this.synonymMappings = synonymMappings;
}
public AttributeGroup getGroup() {
return attrPathSynonymGroup;
}
public SynonymMap getMappings() {
return synonymMappings;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((attrPathSynonymGroup == null) ? 0 : attrPathSynonymGroup.hashCode());
result = prime * result + ((synonymMappings == null) ? 0 : synonymMappings.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
AttributeGroupMapping other = (AttributeGroupMapping) obj;
if (attrPathSynonymGroup == null) {
if (other.attrPathSynonymGroup != null)
return false;
} else if (!attrPathSynonymGroup.equals(other.attrPathSynonymGroup))
return false;
if (synonymMappings == null) {
if (other.synonymMappings != null)
return false;
} else if (!synonymMappings.equals(other.synonymMappings))
return false;
return true;
}
@Override
public String toString() {
return "AttrPathSynonymGroupMapping [attrPathSynonymGroup=" + attrPathSynonymGroup + ", synonymMappings="
+ synonymMappings + "]";
}
}