Java Arrays.equals Examples

Java Arrays.equals - 30 examples found. These are the top rated real world Java examples of java.util.Arrays.equals extracted from open source projects. You can rate examples to help us improve the quality of examples.
 public synchronized boolean equals(java.lang.Object obj) {
   if (!(obj instanceof WarningListType)) return false;
   WarningListType other = (WarningListType) obj;
   if (obj == null) return false;
   if (this == obj) return true;
   if (__equalsCalc != null) {
     return (__equalsCalc == obj);
   }
   __equalsCalc = obj;
   boolean _equals;
   _equals =
       true
           && ((this.phraseIgnored == null && other.getPhraseIgnored() == null)
               || (this.phraseIgnored != null
                   && java.util.Arrays.equals(this.phraseIgnored, other.getPhraseIgnored())))
           && ((this.quotedPhraseNotFound == null && other.getQuotedPhraseNotFound() == null)
               || (this.quotedPhraseNotFound != null
                   && java.util.Arrays.equals(
                       this.quotedPhraseNotFound, other.getQuotedPhraseNotFound())))
           && ((this.outputMessage == null && other.getOutputMessage() == null)
               || (this.outputMessage != null
                   && java.util.Arrays.equals(this.outputMessage, other.getOutputMessage())));
   __equalsCalc = null;
   return _equals;
 }
Example #2
0
  public boolean equals(SliceRange that) {
    if (that == null) return false;

    boolean this_present_start = true && this.isSetStart();
    boolean that_present_start = true && that.isSetStart();
    if (this_present_start || that_present_start) {
      if (!(this_present_start && that_present_start)) return false;
      if (!java.util.Arrays.equals(this.start, that.start)) return false;
    }

    boolean this_present_finish = true && this.isSetFinish();
    boolean that_present_finish = true && that.isSetFinish();
    if (this_present_finish || that_present_finish) {
      if (!(this_present_finish && that_present_finish)) return false;
      if (!java.util.Arrays.equals(this.finish, that.finish)) return false;
    }

    boolean this_present_reversed = true;
    boolean that_present_reversed = true;
    if (this_present_reversed || that_present_reversed) {
      if (!(this_present_reversed && that_present_reversed)) return false;
      if (this.reversed != that.reversed) return false;
    }

    boolean this_present_count = true;
    boolean that_present_count = true;
    if (this_present_count || that_present_count) {
      if (!(this_present_count && that_present_count)) return false;
      if (this.count != that.count) return false;
    }

    return true;
  }
 public synchronized boolean equals(java.lang.Object obj) {
   if (!(obj instanceof ExecuteListViewResult)) return false;
   ExecuteListViewResult other = (ExecuteListViewResult) obj;
   if (obj == null) return false;
   if (this == obj) return true;
   if (__equalsCalc != null) {
     return (__equalsCalc == obj);
   }
   __equalsCalc = obj;
   boolean _equals;
   _equals =
       true
           && ((this.columns == null && other.getColumns() == null)
               || (this.columns != null
                   && java.util.Arrays.equals(this.columns, other.getColumns())))
           && ((this.developerName == null && other.getDeveloperName() == null)
               || (this.developerName != null
                   && this.developerName.equals(other.getDeveloperName())))
           && this.done == other.isDone()
           && ((this.id == null && other.getId() == null)
               || (this.id != null && this.id.equals(other.getId())))
           && ((this.label == null && other.getLabel() == null)
               || (this.label != null && this.label.equals(other.getLabel())))
           && ((this.records == null && other.getRecords() == null)
               || (this.records != null
                   && java.util.Arrays.equals(this.records, other.getRecords())))
           && this.size == other.getSize();
   __equalsCalc = null;
   return _equals;
 }
  private boolean checkBroadcastMergeJoin(DualInputPlanNode join, SingleInputPlanNode reducer) {
    if (DriverStrategy.MERGE == join.getDriverStrategy()) {
      // driver keys
      Assert.assertEquals(set0, join.getKeysForInput1());
      Assert.assertEquals(set0, join.getKeysForInput2());

      // local strategies
      Assert.assertEquals(LocalStrategy.SORT, join.getInput1().getLocalStrategy());
      Assert.assertEquals(LocalStrategy.SORT, join.getInput2().getLocalStrategy());
      Assert.assertEquals(LocalStrategy.COMBININGSORT, reducer.getInput().getLocalStrategy());

      // local strategy keys
      Assert.assertEquals(set0, join.getInput1().getLocalStrategyKeys());
      Assert.assertEquals(set0, join.getInput2().getLocalStrategyKeys());
      Assert.assertTrue(
          Arrays.equals(
              join.getInput1().getLocalStrategySortOrder(),
              join.getInput2().getLocalStrategySortOrder()));
      Assert.assertEquals(set01, reducer.getInput().getLocalStrategyKeys());
      Assert.assertEquals(set01, reducer.getKeys(0));
      Assert.assertTrue(
          Arrays.equals(reducer.getInput().getLocalStrategySortOrder(), reducer.getSortOrders(0)));
      return true;
    } else {
      return false;
    }
  }
 @Action
 public void changePasword() {
   char[] trueOldPasword = user.getPassword();
   char[] passedOldPassword = oldPasswordField.getPassword();
   char[] newPassword = newPasswordField.getPassword();
   char[] confirmPassword = confirmPasswordField.getPassword();
   if (!Arrays.equals(passedOldPassword, trueOldPasword)) {
     showWarningMessage("Please enter the correct old password.", oldPasswordField);
     oldPasswordField.setText("");
     return;
   }
   if (!Arrays.equals(newPassword, confirmPassword)) {
     showWarningMessage("Your new and confirmation passwords do not match.", newPasswordField);
     newPasswordField.setText("");
     confirmPasswordField.setText("");
     return;
   }
   user.setPassword(newPassword);
   try {
     userManager.modifyUser(user);
     dispose();
     showInformationMessage("Your password has been changed!", okButton);
   } catch (PersistenceManagerException ex) {
     Logger.getLogger(PersistenceManager.class.getName()).log(Level.SEVERE, null, ex);
     showErrorMessage(ex.getMessage(), okButton);
   }
 }
 public synchronized boolean equals(java.lang.Object obj) {
   if (!(obj instanceof ContentTargeting)) return false;
   ContentTargeting other = (ContentTargeting) obj;
   if (obj == null) return false;
   if (this == obj) return true;
   if (__equalsCalc != null) {
     return (__equalsCalc == obj);
   }
   __equalsCalc = obj;
   boolean _equals;
   _equals =
       true
           && ((this.targetedContentIds == null && other.getTargetedContentIds() == null)
               || (this.targetedContentIds != null
                   && java.util.Arrays.equals(
                       this.targetedContentIds, other.getTargetedContentIds())))
           && ((this.excludedContentIds == null && other.getExcludedContentIds() == null)
               || (this.excludedContentIds != null
                   && java.util.Arrays.equals(
                       this.excludedContentIds, other.getExcludedContentIds())))
           && ((this.targetedVideoCategoryIds == null
                   && other.getTargetedVideoCategoryIds() == null)
               || (this.targetedVideoCategoryIds != null
                   && java.util.Arrays.equals(
                       this.targetedVideoCategoryIds, other.getTargetedVideoCategoryIds())))
           && ((this.excludedVideoCategoryIds == null
                   && other.getExcludedVideoCategoryIds() == null)
               || (this.excludedVideoCategoryIds != null
                   && java.util.Arrays.equals(
                       this.excludedVideoCategoryIds, other.getExcludedVideoCategoryIds())));
   __equalsCalc = null;
   return _equals;
 }