@Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (!(obj instanceof ModifiableAdminObject)) return false;
   ModifiableAdminObject other = (ModifiableAdminObject) obj;
   if (className == null) {
     if (other.className != null) return false;
   } else if (!className.equals(other.className)) return false;
   if (configProperties == null) {
     if (other.configProperties != null) return false;
   } else if (!configProperties.equals(other.configProperties)) return false;
   if (enabled == null) {
     if (other.enabled != null) return false;
   } else if (!enabled.equals(other.enabled)) return false;
   if (jndiName == null) {
     if (other.jndiName != null) return false;
   } else if (!jndiName.equals(other.jndiName)) return false;
   if (poolName == null) {
     if (other.poolName != null) return false;
   } else if (!poolName.equals(other.poolName)) return false;
   if (useJavaContext == null) {
     if (other.useJavaContext != null) return false;
   } else if (!useJavaContext.equals(other.useJavaContext)) return false;
   return true;
 }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   MolgenisUserViewData other = (MolgenisUserViewData) obj;
   if (active == null) {
     if (other.active != null) return false;
   } else if (!active.equals(other.active)) return false;
   if (firstName == null) {
     if (other.firstName != null) return false;
   } else if (!firstName.equals(other.firstName)) return false;
   if (fullName == null) {
     if (other.fullName != null) return false;
   } else if (!fullName.equals(other.fullName)) return false;
   if (groupList == null) {
     if (other.groupList != null) return false;
   } else if (!groupList.equals(other.groupList)) return false;
   if (id == null) {
     if (other.id != null) return false;
   } else if (!id.equals(other.id)) return false;
   if (lastName == null) {
     if (other.lastName != null) return false;
   } else if (!lastName.equals(other.lastName)) return false;
   if (middleName == null) {
     if (other.middleName != null) return false;
   } else if (!middleName.equals(other.middleName)) return false;
   if (superuser == null) {
     if (other.superuser != null) return false;
   } else if (!superuser.equals(other.superuser)) return false;
   if (username == null) {
     if (other.username != null) return false;
   } else if (!username.equals(other.username)) return false;
   return true;
 }
Exemplo n.º 3
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   QrdaValidationEntity other = (QrdaValidationEntity) obj;
   if (category == null) {
     if (other.category != null) return false;
   } else if (!category.equals(other.category)) return false;
   if (httpError == null) {
     if (other.httpError != null) return false;
   } else if (!httpError.equals(other.httpError)) return false;
   if (id == null) {
     if (other.id != null) return false;
   } else if (!id.equals(other.id)) return false;
   if (schemaErrors == null) {
     if (other.schemaErrors != null) return false;
   } else if (!schemaErrors.equals(other.schemaErrors)) return false;
   if (schematronErrors == null) {
     if (other.schematronErrors != null) return false;
   } else if (!schematronErrors.equals(other.schematronErrors)) return false;
   if (schematronWarnings == null) {
     if (other.schematronWarnings != null) return false;
   } else if (!schematronWarnings.equals(other.schematronWarnings)) return false;
   if (timestamp == null) {
     if (other.timestamp != null) return false;
   } else if (!timestamp.equals(other.timestamp)) return false;
   return true;
 }
Exemplo n.º 4
0
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    final ServiceKAgentConfig that = (ServiceKAgentConfig) o;

    if (!name.equals(that.name)) {
      return false;
    }
    if (newInstance != null ? !newInstance.equals(that.newInstance) : that.newInstance != null) {
      return false;
    }
    if (useKBaseClassloader != null
        ? !useKBaseClassloader.equals(that.useKBaseClassloader)
        : that.useKBaseClassloader != null) {
      return false;
    }
    if (resources != null ? !resources.equals(that.resources) : that.resources != null) {
      return false;
    }
    return true;
  }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   BlockDeviceMapping other = (BlockDeviceMapping) obj;
   if (deleteOnTermination == null) {
     if (other.deleteOnTermination != null) return false;
   } else if (!deleteOnTermination.equals(other.deleteOnTermination)) return false;
   if (deviceName == null) {
     if (other.deviceName != null) return false;
   } else if (!deviceName.equals(other.deviceName)) return false;
   if (noDevice == null) {
     if (other.noDevice != null) return false;
   } else if (!noDevice.equals(other.noDevice)) return false;
   if (sizeInGib == null) {
     if (other.sizeInGib != null) return false;
   } else if (!sizeInGib.equals(other.sizeInGib)) return false;
   if (snapshotId == null) {
     if (other.snapshotId != null) return false;
   } else if (!snapshotId.equals(other.snapshotId)) return false;
   if (virtualName == null) {
     if (other.virtualName != null) return false;
   } else if (!virtualName.equals(other.virtualName)) return false;
   return true;
 }
Exemplo n.º 6
0
  public String updateUser() {
    log.info("updateUser");
    try {

      if (resetPassword.equals(Boolean.TRUE)) {
        log.info("...updating ChangePassword");
        selectedUser = service.updatePassword(selectedUser);
        resetPassword = Boolean.FALSE;
      }
      if (updateRoles.equals(Boolean.TRUE)) {
        log.info("...updating roles");
        List<Roles> rolesObjectList = new ArrayList<Roles>();
        rolesObjectList.add(new Roles(ThreatConstants.RTA_USER_ROLE_NAME));
        for (String role : assignedRoles) {
          rolesObjectList.add(new Roles(role));
        }
        service.assignRolesForUser(selectedUser, rolesObjectList);
        updateRoles = Boolean.FALSE;
      }

      service.updateUser(selectedUser);
      super.addInfoMessage("User account modified.");
    } catch (AccessDeniedException e) {
      super.addErrorMessage(e.getMessage());
    }
    resetValues();
    return "next";
  }
Exemplo n.º 7
0
 @Override
 public boolean equals(Object object) {
   if (this == object) {
     return true;
   }
   if ((object == null) || (object.getClass() != this.getClass())) {
     return false;
   }
   OldElement oldElement = (OldElement) object;
   return ((this.hideDisplay == oldElement.hideDisplay
           || (this.hideDisplay != null && hideDisplay.equals(oldElement.hideDisplay)))
       && (this.description == oldElement.description
           || (this.description != null && description.equals(oldElement.description)))
       && (this.displayName == oldElement.displayName
           || (this.displayName != null && displayName.equals(oldElement.displayName)))
       && (this.tableConstraint == oldElement.tableConstraint
           || (this.tableConstraint != null && tableConstraint.equals(oldElement.tableConstraint)))
       && (this.key == oldElement.key || (this.key != null && key.equals(oldElement.key)))
       && (this.field == oldElement.field
           || (this.field != null && field.equals(oldElement.field)))
       && (this.pointerDataset == oldElement.pointerDataset
           || (this.pointerDataset != null && pointerDataset.equals(oldElement.pointerDataset)))
       && (this.pointerInterface == oldElement.pointerInterface
           || (this.pointerInterface != null
               && pointerInterface.equals(oldElement.pointerInterface)))
       && (this.pointerElement == oldElement.pointerElement
           || (this.pointerElement != null && pointerElement.equals(oldElement.pointerElement)))
       && (this.checkForNulls == oldElement.checkForNulls
           || (this.checkForNulls != null && checkForNulls.equals(oldElement.checkForNulls))));
 }
Exemplo n.º 8
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Board other = (Board) obj;
   if (boardId != other.boardId) return false;
   if (boardType == null) {
     if (other.boardType != null) return false;
   } else if (!boardType.equals(other.boardType)) return false;
   if (ip == null) {
     if (other.ip != null) return false;
   } else if (!ip.equals(other.ip)) return false;
   if (isAnnexB == null) {
     if (other.isAnnexB != null) return false;
   } else if (!isAnnexB.equals(other.isAnnexB)) return false;
   if (isLeasing == null) {
     if (other.isLeasing != null) return false;
   } else if (!isLeasing.equals(other.isLeasing)) return false;
   if (name == null) {
     if (other.name != null) return false;
   } else if (!name.equals(other.name)) return false;
   if (slot == null) {
     if (other.slot != null) return false;
   } else if (!slot.equals(other.slot)) return false;
   return true;
 }
Exemplo n.º 9
0
 @Override
 public boolean equals(final Object obj) {
   if (this == obj) {
     return true;
   }
   if (obj == null) {
     return false;
   }
   if (!(obj instanceof ChampionStatus)) {
     return false;
   }
   final ChampionStatus other = (ChampionStatus) obj;
   if (active == null) {
     if (other.active != null) {
       return false;
     }
   } else if (!active.equals(other.active)) {
     return false;
   }
   if (botEnabled == null) {
     if (other.botEnabled != null) {
       return false;
     }
   } else if (!botEnabled.equals(other.botEnabled)) {
     return false;
   }
   if (botMmEnabled == null) {
     if (other.botMmEnabled != null) {
       return false;
     }
   } else if (!botMmEnabled.equals(other.botMmEnabled)) {
     return false;
   }
   if (champion == null) {
     if (other.champion != null) {
       return false;
     }
   } else if (!champion.equals(other.champion)) {
     return false;
   }
   if (freeToPlay == null) {
     if (other.freeToPlay != null) {
       return false;
     }
   } else if (!freeToPlay.equals(other.freeToPlay)) {
     return false;
   }
   if (rankedPlayEnabled == null) {
     if (other.rankedPlayEnabled != null) {
       return false;
     }
   } else if (!rankedPlayEnabled.equals(other.rankedPlayEnabled)) {
     return false;
   }
   return true;
 }
Exemplo n.º 10
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    ReplyKeyboardHide that = (ReplyKeyboardHide) o;

    if (!hideKeyboard.equals(that.hideKeyboard)) return false;
    return !(selective != null ? !selective.equals(that.selective) : that.selective != null);
  }
Exemplo n.º 11
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (!super.equals(obj)) return false;
   if (getClass() != obj.getClass()) return false;
   DriveInfo other = (DriveInfo) obj;
   if (autoexpanding == null) {
     if (other.autoexpanding != null) return false;
   } else if (!autoexpanding.equals(other.autoexpanding)) return false;
   if (bits == null) {
     if (other.bits != null) return false;
   } else if (!bits.equals(other.bits)) return false;
   if (claimed == null) {
     if (other.claimed != null) return false;
   } else if (!claimed.equals(other.claimed)) return false;
   if (description == null) {
     if (other.description != null) return false;
   } else if (!description.equals(other.description)) return false;
   if (driveType == null) {
     if (other.driveType != null) return false;
   } else if (!driveType.equals(other.driveType)) return false;
   if (encryptionCipher == null) {
     if (other.encryptionCipher != null) return false;
   } else if (!encryptionCipher.equals(other.encryptionCipher)) return false;
   if (encryptionKey == null) {
     if (other.encryptionKey != null) return false;
   } else if (!encryptionKey.equals(other.encryptionKey)) return false;
   if (free == null) {
     if (other.free != null) return false;
   } else if (!free.equals(other.free)) return false;
   if (imaging == null) {
     if (other.imaging != null) return false;
   } else if (!imaging.equals(other.imaging)) return false;
   if (installNotes == null) {
     if (other.installNotes != null) return false;
   } else if (!installNotes.equals(other.installNotes)) return false;
   if (metrics == null) {
     if (other.metrics != null) return false;
   } else if (!metrics.equals(other.metrics)) return false;
   if (os == null) {
     if (other.os != null) return false;
   } else if (!os.equals(other.os)) return false;
   if (status != other.status) return false;
   if (type != other.type) return false;
   if (url == null) {
     if (other.url != null) return false;
   } else if (!url.equals(other.url)) return false;
   if (user == null) {
     if (other.user != null) return false;
   } else if (!user.equals(other.user)) return false;
   return true;
 }
Exemplo n.º 12
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   MutableResourceInfoImpl other = (MutableResourceInfoImpl) obj;
   if (accessed == null) {
     if (other.accessed != null) return false;
   } else if (!accessed.equals(other.accessed)) return false;
   if (bytes == null) {
     if (other.bytes != null) return false;
   } else if (!bytes.equals(other.bytes)) return false;
   if (created == null) {
     if (other.created != null) return false;
   } else if (!created.equals(other.created)) return false;
   if (inProject == null) {
     if (other.inProject != null) return false;
   } else if (!inProject.equals(other.inProject)) return false;
   if (metadata == null) {
     if (other.metadata != null) return false;
   } else if (!metadata.equals(other.metadata)) return false;
   if (modified == null) {
     if (other.modified != null) return false;
   } else if (!modified.equals(other.modified)) return false;
   if (name == null) {
     if (other.name != null) return false;
   } else if (!name.equals(other.name)) return false;
   if (owner == null) {
     if (other.owner != null) return false;
   } else if (!owner.equals(other.owner)) return false;
   if (parent == null) {
     if (other.parent != null) return false;
   } else if (!parent.equals(other.parent)) return false;
   if (shared == null) {
     if (other.shared != null) return false;
   } else if (!shared.equals(other.shared)) return false;
   if (tags == null) {
     if (other.tags != null) return false;
   } else if (!tags.equals(other.tags)) return false;
   if (type == null) {
     if (other.type != null) return false;
   } else if (!type.equals(other.type)) return false;
   if (url == null) {
     if (other.url != null) return false;
   } else if (!url.equals(other.url)) return false;
   if (version == null) {
     if (other.version != null) return false;
   } else if (!version.equals(other.version)) return false;
   return true;
 }
Exemplo n.º 13
0
  public List getAllActiveSynapticConductances() {
    List list = new ArrayList();

    String pre = ReMoto.ACTIVE;
    String pos = ReMoto.ACTIVE;

    Hashtable active = new Hashtable();

    // Verify active neuronTypes
    for (int i = 0; i < neuronTypes.size(); i++) {
      NeuronVO nt = (NeuronVO) neuronTypes.get(i);

      active.put(nt.getCategoryAndType() + " " + nt.getCdNucleus(), new Boolean(nt.isActive()));
    }

    Iterator it = synapseTypes.values().iterator();

    while (it.hasNext()) {
      ConductanceVO g = (ConductanceVO) it.next();

      if ((pre.equals(ReMoto.ALL) || pre.equals(ReMoto.ACTIVE))
          && (g.getCdConductanceType().lastIndexOf(pos) > 0
              || pos.equals(ReMoto.ALL)
              || pos.equals(ReMoto.ACTIVE))) {
        Boolean statePre = (Boolean) active.get(g.getPreSimple() + " " + g.getCdNucleusPre());
        Boolean statePos = (Boolean) active.get(g.getPos() + " " + g.getCdNucleus());

        if ((pre.equals(ReMoto.ALL)
                || (pre.equals(ReMoto.ACTIVE) && statePre != null && statePre.equals(Boolean.TRUE)))
            && (g.getPos().indexOf(pos) == 0
                || pos.equals(ReMoto.ALL)
                || (pos.equals(ReMoto.ACTIVE)
                    && statePos != null
                    && statePos.equals(Boolean.TRUE)))) {
          // Set synaptic dynamics type (depressing, facilitating or none)
          DynamicVO vo =
              getDynamicType(g.getCdConductanceType(), g.getCdNucleusPre(), g.getCdNucleus());
          g.setDynamics(vo);

          list.add(g);
        }
      }
    }

    Collections.sort(list);

    return list;
  }
Exemplo n.º 14
0
      @SuppressWarnings("unchecked")
      @Override
      public void render(
          com.google.gwt.cell.client.Cell.Context context, Boolean value, SafeHtmlBuilder sb) {
        // Get the view data.
        Object key = context.getKey();
        E keyValue = (E) key;
        if (disabledSet.contains(keyValue)) {
          // disabled
          Boolean viewData = getViewData(key);
          if (viewData != null && viewData.equals(value)) {
            clearViewData(key);
            viewData = null;
          }

          if (value != null && ((viewData != null) ? viewData : value)) {
            sb.append(INPUT_CHECKED_DISABLED);
          } else {
            sb.append(INPUT_UNCHECKED_DISABLED);
          }
        } else {
          // enabled
          super.render(context, value, sb);
        }
      }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 @Override
 public boolean eIsSet(int featureID) {
   switch (featureID) {
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__ACTUAL_START:
       return actualStart != null;
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__EARLY_START:
       return earlyStart != null;
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__LATE_START:
       return lateStart != null;
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__SCHEDULE_START:
       return scheduleStart != null;
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__ACTUAL_FINISH:
       return actualFinish != null;
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__EARLY_FINISH:
       return earlyFinish != null;
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__LATE_FINISH:
       return lateFinish != null;
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__SCHEDULE_FINISH:
       return scheduleFinish != null;
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__SCHEDULE_DURATION:
       return SCHEDULE_DURATION_EDEFAULT == null
           ? scheduleDuration != null
           : !SCHEDULE_DURATION_EDEFAULT.equals(scheduleDuration);
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__ACTUAL_DURATION:
       return ACTUAL_DURATION_EDEFAULT == null
           ? actualDuration != null
           : !ACTUAL_DURATION_EDEFAULT.equals(actualDuration);
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__REMAINING_TIME:
       return REMAINING_TIME_EDEFAULT == null
           ? remainingTime != null
           : !REMAINING_TIME_EDEFAULT.equals(remainingTime);
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__FREE_FLOAT:
       return FREE_FLOAT_EDEFAULT == null
           ? freeFloat != null
           : !FREE_FLOAT_EDEFAULT.equals(freeFloat);
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__TOTAL_FLOAT:
       return TOTAL_FLOAT_EDEFAULT == null
           ? totalFloat != null
           : !TOTAL_FLOAT_EDEFAULT.equals(totalFloat);
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__IS_CRITICAL:
       return IS_CRITICAL_EDEFAULT == null
           ? isCritical != null
           : !IS_CRITICAL_EDEFAULT.equals(isCritical);
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__STATUS_TIME:
       return statusTime != null;
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__START_FLOAT:
       return START_FLOAT_EDEFAULT == null
           ? startFloat != null
           : !START_FLOAT_EDEFAULT.equals(startFloat);
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__FINISH_FLOAT:
       return FINISH_FLOAT_EDEFAULT == null
           ? finishFloat != null
           : !FINISH_FLOAT_EDEFAULT.equals(finishFloat);
     case FinalPackage.IFC_SCHEDULE_TIME_CONTROL__COMPLETION:
       return COMPLETION_EDEFAULT == null
           ? completion != null
           : !COMPLETION_EDEFAULT.equals(completion);
   }
   return super.eIsSet(featureID);
 }
Exemplo n.º 16
0
 public void test(TestHarness th) {
   th.check(Boolean.TRUE.booleanValue());
   th.check(!Boolean.FALSE.booleanValue());
   Boolean b = new Boolean(true);
   Boolean b2 = new Boolean(false);
   Boolean b3 = new Boolean(true);
   th.check(b.booleanValue());
   th.check(!b2.booleanValue());
   th.check(b.toString(), "true");
   th.check(b2.toString(), "false");
   th.check(b.hashCode(), 1231);
   th.check(b2.hashCode(), 1237);
   th.check(!b.equals(null));
   th.check(!b.equals(b2));
   th.check(b.equals(b3));
 }
Exemplo n.º 17
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    BahmniObservation that = (BahmniObservation) o;

    if (conceptSortWeight != that.conceptSortWeight) return false;
    if (duration != null ? !duration.equals(that.duration) : that.duration != null) return false;
    if (encounterDateTime != null
        ? !encounterDateTime.equals(that.encounterDateTime)
        : that.encounterDateTime != null) return false;
    if (encounterTransactionObservation != null
        ? !encounterTransactionObservation.equals(that.encounterTransactionObservation)
        : that.encounterTransactionObservation != null) return false;
    if (groupMembers != null ? !groupMembers.equals(that.groupMembers) : that.groupMembers != null)
      return false;
    if (isAbnormal != null ? !isAbnormal.equals(that.isAbnormal) : that.isAbnormal != null)
      return false;
    if (providers != null ? !providers.equals(that.providers) : that.providers != null)
      return false;
    if (targetObsRelation != null
        ? !targetObsRelation.equals(that.targetObsRelation)
        : that.targetObsRelation != null) return false;
    if (type != null ? !type.equals(that.type) : that.type != null) return false;
    if (visitStartDateTime != null
        ? !visitStartDateTime.equals(that.visitStartDateTime)
        : that.visitStartDateTime != null) return false;

    return true;
  }
Exemplo n.º 18
0
  @Override
  public String toXML() {
    if ((items == null) || (items.size() == 0)) {
      return super.toXML();
    } else {
      StringBuilder builder = new StringBuilder("<");
      builder.append(getElementName());
      builder.append(" node='");
      builder.append(getNode());

      if (notify != null) {
        builder.append("' ");
        builder.append(type.getElementAttribute());
        builder.append("='");
        builder.append(notify.equals(Boolean.TRUE) ? 1 : 0);
        builder.append("'>");
      } else {
        builder.append("'>");
        for (PacketExtension item : items) {
          builder.append(item.toXML());
        }
      }

      builder.append("</");
      builder.append(getElementName());
      builder.append(">");
      return builder.toString();
    }
  }
Exemplo n.º 19
0
 public NameAndValueList getMappingAssociationNames(String scheme, String version) {
   CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
   if (version != null) {
     csvt.setVersion(version);
   }
   NameAndValueList navList = new NameAndValueList();
   try {
     CodingScheme cs = lbSvc.resolveCodingScheme(scheme, csvt);
     Relations[] relations = cs.getRelations();
     for (int i = 0; i < relations.length; i++) {
       Relations relation = relations[i];
       Boolean isMapping = relation.isIsMapping();
       if (isMapping != null && isMapping.equals(Boolean.TRUE)) {
         AssociationPredicate[] associationPredicates = relation.getAssociationPredicate();
         for (int j = 0; j < associationPredicates.length; j++) {
           AssociationPredicate associationPredicate = associationPredicates[j];
           String name = associationPredicate.getAssociationName();
           NameAndValue vNameAndValue = new NameAndValue();
           vNameAndValue.setName(name);
           navList.addNameAndValue(vNameAndValue);
         }
         return navList;
       } else {
         return null;
       }
     }
   } catch (Exception ex) {
     ex.printStackTrace();
   }
   return null;
 }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (!super.equals(obj)) return false;
   if (getClass() != obj.getClass()) return false;
   VCloudExpressNetworkImpl other = (VCloudExpressNetworkImpl) obj;
   if (description == null) {
     if (other.description != null) return false;
   } else if (!description.equals(other.description)) return false;
   if (dhcp == null) {
     if (other.dhcp != null) return false;
   } else if (!dhcp.equals(other.dhcp)) return false;
   if (dnsServers == null) {
     if (other.dnsServers != null) return false;
   } else if (!dnsServers.equals(other.dnsServers)) return false;
   if (fenceModes == null) {
     if (other.fenceModes != null) return false;
   } else if (!fenceModes.equals(other.fenceModes)) return false;
   if (firewallRules == null) {
     if (other.firewallRules != null) return false;
   } else if (!firewallRules.equals(other.firewallRules)) return false;
   if (gateway == null) {
     if (other.gateway != null) return false;
   } else if (!gateway.equals(other.gateway)) return false;
   if (natRules == null) {
     if (other.natRules != null) return false;
   } else if (!natRules.equals(other.natRules)) return false;
   if (netmask == null) {
     if (other.netmask != null) return false;
   } else if (!netmask.equals(other.netmask)) return false;
   return true;
 }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) {
     return true;
   }
   if (obj == null) {
     return false;
   }
   if (getClass() != obj.getClass()) {
     return false;
   }
   ResultObject other = (ResultObject) obj;
   if (active == null) {
     if (other.active != null) {
       return false;
     }
   } else if (!active.equals(other.active)) {
     return false;
   }
   if (age == null) {
     if (other.age != null) {
       return false;
     }
   } else if (!age.equals(other.age)) {
     return false;
   }
   if (name == null) {
     if (other.name != null) {
       return false;
     }
   } else if (!name.equals(other.name)) {
     return false;
   }
   return true;
 }
Exemplo n.º 22
0
    /** {@inheritDoc} */
    @SuppressWarnings({"BigDecimalEquals", "EqualsHashCodeCalledOnUrl", "RedundantIfStatement"})
    @Override
    public boolean equals(Object o) {
      if (this == o) return true;
      if (o == null || getClass() != o.getClass()) return false;

      TestObject that = (TestObject) o;

      if (id != that.id) return false;
      if (!Arrays.equals(arrVal, that.arrVal)) return false;
      if (bigVal != null ? !bigVal.equals(that.bigVal) : that.bigVal != null) return false;
      if (boolVal != null ? !boolVal.equals(that.boolVal) : that.boolVal != null) return false;
      if (byteVal != null ? !byteVal.equals(that.byteVal) : that.byteVal != null) return false;
      if (dateVal != null ? !dateVal.equals(that.dateVal) : that.dateVal != null) return false;
      if (doubleVal != null ? !doubleVal.equals(that.doubleVal) : that.doubleVal != null)
        return false;
      if (f1 != null ? !f1.equals(that.f1) : that.f1 != null) return false;
      if (f2 != null ? !f2.equals(that.f2) : that.f2 != null) return false;
      if (f3 != null ? !f3.equals(that.f3) : that.f3 != null) return false;
      if (floatVal != null ? !floatVal.equals(that.floatVal) : that.floatVal != null) return false;
      if (intVal != null ? !intVal.equals(that.intVal) : that.intVal != null) return false;
      if (longVal != null ? !longVal.equals(that.longVal) : that.longVal != null) return false;
      if (shortVal != null ? !shortVal.equals(that.shortVal) : that.shortVal != null) return false;
      if (strVal != null ? !strVal.equals(that.strVal) : that.strVal != null) return false;
      if (timeVal != null ? !timeVal.equals(that.timeVal) : that.timeVal != null) return false;
      if (tsVal != null ? !tsVal.equals(that.tsVal) : that.tsVal != null) return false;
      if (urlVal != null ? !urlVal.equals(that.urlVal) : that.urlVal != null) return false;

      return true;
    }
Exemplo n.º 23
0
  public static int getDocTypeIDForCustomerReturnOrder(Properties ctx, Boolean isSotrx)
      throws OperationException {
    char sotrx = ' ';

    if (isSotrx.equals(true)) {
      sotrx = 'Y';
    } else {
      sotrx = 'N';
    }

    int[] docTypes =
        MDocType.getAllIDs(
            MDocType.Table_Name,
            "AD_CLIENT_ID="
                + Env.getAD_Client_ID(ctx)
                + " and DOCSUBTYPESO='"
                + MDocType.DOCSUBTYPESO_ReturnMaterial
                + "' and isSotrx='"
                + sotrx
                + "'",
            null);
    if (docTypes.length > 1)
      throw new OperationException(
          "Expected one document type for Return Material but got more than 1");

    return docTypes[0];
  }
Exemplo n.º 24
0
  @Override
  public boolean equals(final Object o) {
    if (this == o) {
      return true;
    }
    if (!(o instanceof QueryImpl)) {
      return false;
    }

    final QueryImpl<?> query = (QueryImpl<?>) o;

    if (validateName != query.validateName) {
      return false;
    }
    if (validateType != query.validateType) {
      return false;
    }
    if (!dbColl.equals(query.dbColl)) {
      return false;
    }
    if (!clazz.equals(query.clazz)) {
      return false;
    }
    if (includeFields != null
        ? !includeFields.equals(query.includeFields)
        : query.includeFields != null) {
      return false;
    }
    if (baseQuery != null ? !baseQuery.equals(query.baseQuery) : query.baseQuery != null) {
      return false;
    }
    return compare(options, query.options);
  }
  @Override
  public boolean AddConstraints(
      LearnerGraph graph, LearnerGraph outcome, StringBuffer counterExampleHolder) {
    LearnerGraph copyOfOutcome = null;
    boolean result = false;

    // First, we call the expected method
    if (Thread.currentThread() == secondThread) {
      result = whatToCompareWith.AddConstraints(graph, outcome, counterExampleHolder);
      copyOfOutcome = new LearnerGraph(outcome, outcome.config);
      cGraph = copyOfOutcome;
      cResult = result;
    } else {
      result = decoratedLearner.AddConstraints(graph, outcome, counterExampleHolder);
      copyOfOutcome = new LearnerGraph(outcome, outcome.config);
    }
    syncOnCallOf(KIND_OF_METHOD.M_ADDCONSTRAINTS);

    if (Thread.currentThread() != secondThread) { // second thread, checking.

      if (!cResult.equals(new Boolean(result)))
        failureCode = new IllegalArgumentException("different success value of AddConstraints");
      else {
        if (result) checkGraphEquality(cGraph, copyOfOutcome);
      }
      cGraph = null;
      cResult = null; // reset stored data
    }

    syncOnCallOf(KIND_OF_METHOD.M_METHODEXIT); // aims to stop one of the threads running fast
    // from the first checkCall and overwriting the stored value before the other
    // thread had a chance to use it in a comparison.

    return result;
  }
  /**
   * Gets the value of a parameter identified by its name. Returns {@link Boolean} values. If there
   * is no parameter with the given name specified, the given default value is used. <br>
   * <br>
   * Note that if there was previously already a call that needed to return a default value for this
   * parameter name and this time there is another default value given (different from the first
   * one), the default value of the first call is returned!
   *
   * @param parameterName the name of the parameter
   * @param defaultVal the default value to use if there is no parameter with the given name
   *     specified
   * @return an {@link Boolean} representing the value of the parameter or a default value if no
   *     parameter with the given name exists
   */
  public static Boolean getBoolean(String parameterName, Boolean defaultVal) {
    SimulationParameters.checkSimulationParametersState();

    if (SimulationParameters.exists(parameterName)) {
      return SimulationParameters.myParamProvider.getBoolean(parameterName);
    }

    if (SimulationParameters.savedDefaultValues.containsKey(parameterName)) {
      // we already used a default value for this parameter -- check if they are the same and return
      // the saved one
      Boolean savedDefaultValue =
          (Boolean) SimulationParameters.savedDefaultValues.get(parameterName);
      if (!savedDefaultValue.equals(defaultVal)) {
        SimulationParameters.warnWrongDefaultValueMessage(
            parameterName, defaultVal, savedDefaultValue);
      }
      return savedDefaultValue;
    } else {
      // we did not already use a default value for this parameter -- save this one
      SimulationParameters.savedDefaultValues.put(parameterName, defaultVal);
    }

    SimulationParameters.warnDefaultValueMessage(parameterName, defaultVal);
    return defaultVal;
  }
Exemplo n.º 27
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   UserFile other = (UserFile) obj;
   if (date == null) {
     if (other.date != null) return false;
   } else if (!date.equals(other.date)) return false;
   if (id == null) {
     if (other.id != null) return false;
   } else if (!id.equals(other.id)) return false;
   if (idFolder == null) {
     if (other.idFolder != null) return false;
   } else if (!idFolder.equals(other.idFolder)) return false;
   if (idUser != other.idUser) return false;
   if (isPublic == null) {
     if (other.isPublic != null) return false;
   } else if (!isPublic.equals(other.isPublic)) return false;
   if (name == null) {
     if (other.name != null) return false;
   } else if (!name.equals(other.name)) return false;
   if (nameIncome == null) {
     if (other.nameIncome != null) return false;
   } else if (!nameIncome.equals(other.nameIncome)) return false;
   if (path == null) {
     if (other.path != null) return false;
   } else if (!path.equals(other.path)) return false;
   if (size != other.size) return false;
   if (type == null) {
     if (other.type != null) return false;
   } else if (!type.equals(other.type)) return false;
   return true;
 }
  @Override
  public Result execute(Map<String, Object> arguments) throws UiObjectNotFoundException {
    super.execute(arguments);
    @SuppressWarnings("unchecked")
    List<String> optionNames = (List<String>) arguments.get("optionNames");
    ;
    UiScrollable optionsMenu =
        new UiScrollable(
            new UiSelector()
                .className("android.widget.ListView")
                .packageName("com.android.settings")
                .focused(false));

    if (!isUiObjectAvailable(optionsMenu, arguments)) {
      return Result.FAILURE;
    }

    for (String optionName : optionNames) {
      UiObject option =
          optionsMenu.getChildByText(
              new UiSelector().className(TextView.class.getName()), optionName);
      if (!isUiObjectAvailable(option, arguments) && !enabled.equals(option.isEnabled())) {
        return Result.FAILURE;
      }
    }
    return Result.OK;
  }
  protected BigDecimal encode(Boolean variableValue) {
    if (variableValue.equals(Boolean.TRUE)) {
      return BigDecimal.ONE;
    }

    return BigDecimal.ZERO;
  }
 /* (non-Javadoc)
  * @see java.lang.Object#equals(java.lang.Object)
  */
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (!super.equals(obj)) return false;
   if (getClass() != obj.getClass()) return false;
   ProductMedia other = (ProductMedia) obj;
   if (exclude == null) {
     if (other.exclude != null) return false;
   } else if (!exclude.equals(other.exclude)) return false;
   if (file == null) {
     if (other.file != null) return false;
   } else if (!file.equals(other.file)) return false;
   if (image == null) {
     if (other.image != null) return false;
   } else if (!image.equals(other.image)) return false;
   if (label == null) {
     if (other.label != null) return false;
   } else if (!label.equals(other.label)) return false;
   if (position == null) {
     if (other.position != null) return false;
   } else if (!position.equals(other.position)) return false;
   if (types == null) {
     if (other.types != null) return false;
   } else if (!types.equals(other.types)) return false;
   if (url == null) {
     if (other.url != null) return false;
   } else if (!url.equals(other.url)) return false;
   return true;
 }