@Override
public boolean equals( Object obj ) {
if(this == obj)return true;
if(!(obj instanceof LinkDTO)) return false;
LinkDTO linkDTO= (LinkDTO)obj;
return Objects.equals(sourceEquipId,linkDTO.getSourceEquipId())
&& Objects.equals(destEquipId,linkDTO.getDestEquipId())
&& Objects.equals(sourceIfIndex,linkDTO.getSourceIfIndex())
&& Objects.equals(destIfIndex,linkDTO.getDestIfIndex());
}
@Override
public int hashCode() {
return Objects.hash( sourceEquipId, destEquipId, sourceIfIndex, destIfIndex );
}
@Override
public String toString(){
return ToStringBuilder.reflectionToString( this );
}
//实现Cloneable接口
public Object clone() {
Criteria o = null;
try {
o = (Criteria) super.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return o;
}