/// <summary> /// 是否数据一致 /// </summary> protected override bool toDataEquals(BaseData data) { if (!base.toDataEquals(data)) { return(false); } CenterRoleGroupToolData mData = (CenterRoleGroupToolData)data; if (mData.roleGroupSimpleDataDic != null) { if (this.roleGroupSimpleDataDic == null) { return(false); } if (this.roleGroupSimpleDataDic.size() != mData.roleGroupSimpleDataDic.size()) { return(false); } LongObjectMap <RoleGroupSimpleData> roleGroupSimpleDataDicR = mData.roleGroupSimpleDataDic; if (!this.roleGroupSimpleDataDic.isEmpty()) { long roleGroupSimpleDataDicKFreeValue = this.roleGroupSimpleDataDic.getFreeValue(); long[] roleGroupSimpleDataDicKKeys = this.roleGroupSimpleDataDic.getKeys(); RoleGroupSimpleData[] roleGroupSimpleDataDicVValues = this.roleGroupSimpleDataDic.getValues(); for (int roleGroupSimpleDataDicKI = roleGroupSimpleDataDicKKeys.Length - 1; roleGroupSimpleDataDicKI >= 0; --roleGroupSimpleDataDicKI) { long roleGroupSimpleDataDicK = roleGroupSimpleDataDicKKeys[roleGroupSimpleDataDicKI]; if (roleGroupSimpleDataDicK != roleGroupSimpleDataDicKFreeValue) { RoleGroupSimpleData roleGroupSimpleDataDicV = roleGroupSimpleDataDicVValues[roleGroupSimpleDataDicKI]; RoleGroupSimpleData roleGroupSimpleDataDicU = roleGroupSimpleDataDicR.get(roleGroupSimpleDataDicK); if (roleGroupSimpleDataDicU != null) { if (roleGroupSimpleDataDicV == null) { return(false); } if (!roleGroupSimpleDataDicV.dataEquals(roleGroupSimpleDataDicU)) { return(false); } } else { if (roleGroupSimpleDataDicV != null) { return(false); } } } } } } else { if (this.roleGroupSimpleDataDic != null) { return(false); } } return(true); }
/// <summary> /// 是否数据一致 /// </summary> protected override bool toDataEquals(BaseData data) { if (!base.toDataEquals(data)) { return(false); } RoleGroupToolData mData = (RoleGroupToolData)data; if (mData.simpleDatas != null) { if (this.simpleDatas == null) { return(false); } if (this.simpleDatas.size() != mData.simpleDatas.size()) { return(false); } LongObjectMap <RoleGroupSimpleData> simpleDatasR = mData.simpleDatas; if (!this.simpleDatas.isEmpty()) { long simpleDatasKFreeValue = this.simpleDatas.getFreeValue(); long[] simpleDatasKKeys = this.simpleDatas.getKeys(); RoleGroupSimpleData[] simpleDatasVValues = this.simpleDatas.getValues(); for (int simpleDatasKI = simpleDatasKKeys.Length - 1; simpleDatasKI >= 0; --simpleDatasKI) { long simpleDatasK = simpleDatasKKeys[simpleDatasKI]; if (simpleDatasK != simpleDatasKFreeValue) { RoleGroupSimpleData simpleDatasV = simpleDatasVValues[simpleDatasKI]; RoleGroupSimpleData simpleDatasU = simpleDatasR.get(simpleDatasK); if (simpleDatasU != null) { if (simpleDatasV == null) { return(false); } if (!simpleDatasV.dataEquals(simpleDatasU)) { return(false); } } else { if (simpleDatasV != null) { return(false); } } } } } } else { if (this.simpleDatas != null) { return(false); } } return(true); }