@Override
 public boolean equals(Object obj) {
   EmployerCalendarKey test = (EmployerCalendarKey) obj;
   EqualsBuilder builder = new EqualsBuilder();
   builder.append(this.getReference(), test.getReference());
   builder.append(this.getCalendarId(), test.getCalendarId());
   return builder.isEquals();
 }
 @Override
 public boolean equals(Object object) {
   if (object instanceof Setting) {
     Setting otherObject = (Setting) object;
     EqualsBuilder equalsBuilder = new EqualsBuilder();
     equalsBuilder.append(getPosition(), otherObject.getPosition());
     return equalsBuilder.isEquals();
   }
   return false;
 }
示例#3
0
  @Override
  public boolean equals(Object obj) {
    EqualsBuilder builder = new EqualsBuilder();
    if (!(obj instanceof Point)) {
      return false;
    }
    Point another = (Point) obj;
    builder.append(another.column, column);
    builder.append(another.row, row);

    return builder.isEquals();
  }
 @Override
 public boolean equals(Object o) {
   if (o == null) {
     return false;
   }
   if (!(o instanceof EmailDetails)) {
     return false;
   }
   EmailDetails rhs = (EmailDetails) o;
   EqualsBuilder b = new EqualsBuilder();
   b.append(freeMail, rhs.freeMail);
   b.append(carderEmail, rhs.carderEmail);
   return b.isEquals();
 }
 /** {@inheritDoc} */
 @Override
 public boolean equals(Object obj) {
   boolean equals = this == obj;
   if (!equals) {
     equals = obj != null && obj instanceof PretDTO;
     if (equals) {
       PretDTO pretDTO = (PretDTO) obj;
       EqualsBuilder equalsBuilder = new EqualsBuilder();
       equalsBuilder.appendSuper(super.equals(pretDTO));
       equalsBuilder.append(getIdPret(), pretDTO.getIdPret());
       equals = equalsBuilder.isEquals();
     }
   }
   return equals;
 }
 @Override
 public boolean equals(final Object obj) {
   if (obj == null) {
     return false;
   }
   if (obj == this) {
     return true;
   }
   if (obj.getClass() != getClass()) {
     return false;
   }
   final CachingPrincipalAttributesRepository rhs = (CachingPrincipalAttributesRepository) obj;
   final EqualsBuilder builder = new EqualsBuilder();
   return builder.append(this.duration, rhs.duration).isEquals();
 }
示例#7
0
 /**
  * Equality based on projected object.
  *
  * <p>{@inheritDoc}
  */
 @Override
 public boolean equals(Object obj) {
   if (!(obj instanceof BeanModule)) {
     return false;
   }
   if (this == obj) {
     return true;
   }
   BeanModule rhs = (BeanModule) obj;
   EqualsBuilder equalsBuilder = new EqualsBuilder().appendSuper(super.equals(obj));
   if (moduleObject != null) {
     equalsBuilder.append(moduleObject, rhs.moduleObject);
   }
   return equalsBuilder.isEquals();
 }
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;

    if (o == null || getClass() != o.getClass()) return false;

    VersionImpl version = (VersionImpl) o;
    EqualsBuilder builder = new EqualsBuilder();
    int length = Math.max(numbers.length, version.numbers.length);
    VirtualNumberIterator thisIterator = new VirtualNumberIterator(numbers, length);
    VirtualNumberIterator otherIterator = new VirtualNumberIterator(version.numbers, length);
    while (thisIterator.hasNext() && builder.isEquals()) {
      builder.append(thisIterator.next(), otherIterator.next());
    }
    return builder.isEquals();
  }
示例#9
0
 @Override
 public boolean equals(Object object) {
   if (!(object instanceof BookCollection)) {
     return false;
   }
   return EqualsBuilder.reflectionEquals(this, object);
 }
示例#10
0
 @Override
 @Generated(
     value = "com.sun.tools.xjc.Driver",
     date = "2015-11-04T10:30:05+01:00",
     comments = "JAXB RI v2.2.11")
 public boolean equals(Object that) {
   return EqualsBuilder.reflectionEquals(this, that);
 }
示例#11
0
 @Override
 public boolean equals(Object o) {
   if (o == this) {
     return true;
   } else if (o instanceof BindRuleImpl) {
     EqualsBuilder eq = new EqualsBuilder();
     BindRuleImpl or = (BindRuleImpl) o;
     return eq.append(depType, or.depType)
         .append(implType, or.implType)
         .append(flags, or.flags)
         .append(qualifier, or.qualifier)
         .append(policy, or.policy)
         .append(satisfaction, or.satisfaction)
         .isEquals();
   } else {
     return false;
   }
 }
示例#12
0
  @Override
  public boolean equals(Object obj) {
    if (obj == null || obj.getClass() != this.getClass()) {
      return false;
    }

    if (obj == this) {
      return true;
    }
    EqualsBuilder builder = new EqualsBuilder();
    Book other = (Book) obj;
    builder
        .append(this.getId(), other.getId())
        .append(this.getTitle(), other.getTitle())
        .append(this.getIsbn(), other.getIsbn())
        .append(this.getPublishedDate(), other.getPublishedDate());
    return builder.isEquals();
  }
  @Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;
    if (getClass() != obj.getClass()) return false;
    ContactAddress other = (ContactAddress) obj;

    return EqualsBuilder.reflectionEquals(this, other, true);
  }
 @Override
 public boolean equals(Object theObj) {
   if (this == theObj) {
     return true;
   }
   if (theObj == null) {
     return false;
   }
   if (!(theObj instanceof ResourceIndexedSearchParamString)) {
     return false;
   }
   ResourceIndexedSearchParamString obj = (ResourceIndexedSearchParamString) theObj;
   EqualsBuilder b = new EqualsBuilder();
   b.append(getParamName(), obj.getParamName());
   b.append(getResource(), obj.getResource());
   b.append(getValueExact(), obj.getValueExact());
   return b.isEquals();
 }
  /* (non-Javadoc)
   * @see java.lang.Object#equals(java.lang.Object)
   */
  @Override
  public boolean equals(Object obj) {
    if (!(obj instanceof RoutingProcessorConfiguration)) return false;

    RoutingProcessorConfiguration o = (RoutingProcessorConfiguration) obj;

    EqualsBuilder builder =
        (new EqualsBuilder()).append(getRoutingInstances().size(), o.getRoutingInstances().size());

    if (builder.isEquals()) {
      Iterator<RoutingInstanceConfiguration> lit = getRoutingInstances().iterator();
      Iterator<RoutingInstanceConfiguration> rit = o.getRoutingInstances().iterator();

      while (lit.hasNext()) builder.append(lit.next(), rit.next());
    }

    return builder.isEquals();
  }
示例#16
0
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }

    if (!(obj instanceof CharMorpher)) {
      return false;
    }

    CharMorpher other = (CharMorpher) obj;
    EqualsBuilder builder = new EqualsBuilder();
    if (isUseDefault() && other.isUseDefault()) {
      builder.append(getDefaultValue(), other.getDefaultValue());
      return builder.isEquals();
    }
    return !isUseDefault() && !other.isUseDefault() && builder.isEquals();
  }
示例#17
0
文件: Pair.java 项目: GitHug/pair
  /**
   * Equals method. The ordering of the input doesn't matter. The pair pair(1, 2) is considered to
   * be equal to pair(2, 1).
   *
   * @param o The object to be compared with this object.
   */
  @Override
  public boolean equals(Object o) {
    if (o == null) {
      return false;
    } else if (getClass() != o.getClass()) {
      return false;
    }

    @SuppressWarnings("unchecked")
    Pair<X, Y> pair = (Pair<X, Y>) o;

    if (pair.x == null || pair.y == null || x == null || y == null) {
      return false;
    }

    EqualsBuilder eq0 = new EqualsBuilder();
    EqualsBuilder eq1 = new EqualsBuilder();

    eq0.append(x, pair.x);
    eq0.append(y, pair.y);

    eq1.append(y, pair.x);
    eq1.append(x, pair.y);

    return eq0.isEquals() || eq1.isEquals();
  }
  @Override
  public boolean equals(final Object o) {
    if (o == null) {
      return false;
    }

    if (this == o) {
      return true;
    }

    if (!(o instanceof AbstractRegisteredService)) {
      return false;
    }

    final AbstractRegisteredService that = (AbstractRegisteredService) o;

    final EqualsBuilder builder = new EqualsBuilder();
    return builder
        .append(this.proxyPolicy, that.proxyPolicy)
        .append(this.evaluationOrder, that.evaluationOrder)
        .append(this.description, that.description)
        .append(this.name, that.name)
        .append(this.serviceId, that.serviceId)
        .append(this.theme, that.theme)
        .append(this.usernameAttributeProvider, that.usernameAttributeProvider)
        .append(this.logoutType, that.logoutType)
        .append(this.attributeReleasePolicy, that.attributeReleasePolicy)
        .append(this.accessStrategy, that.accessStrategy)
        .append(this.logo, that.logo)
        .append(this.publicKey, that.publicKey)
        .append(this.logoutUrl, that.logoutUrl)
        .append(this.requiredHandlers, that.requiredHandlers)
        .append(this.proxyPolicy, that.proxyPolicy)
        .append(this.properties, that.properties)
        .append(this.multifactorPolicy, that.multifactorPolicy)
        .isEquals();
  }
  @Test
  public void addAndGetHeaders() {
    Header[] headers = {
      new Header("foo", 1), // $NON-NLS-1$
      new Header("bar", 2), // $NON-NLS-1$
      new Header("baz", 3) // $NON-NLS-1$
    };
    for (Header header : headers) {
      htmlSerializerContext.addHeader(header.getText(), header.getLevel());
    }

    List<Header> result = htmlSerializerContext.getHeaders();
    for (int i = 0; i < result.size(); i++) {
      assertTrue(EqualsBuilder.reflectionEquals(result.get(i), headers[i], true));
    }
  }
  @Override
  public boolean matchesSafely(Course actual) {
    if (actual == null) {
      return false;
    }

    EqualsBuilder eq = new EqualsBuilder();
    eq.append(expected.getId(), actual.getId());
    eq.append(expected.getUuid(), actual.getUuid());
    eq.append(expected.getCode(), actual.getCode());
    eq.append(expected.getName(), actual.getName());
    eq.append(expected.getSummary(), actual.getSummary());
    eq.append(expected.getDescription(), actual.getDescription());
    eq.append(expected.getCreditHours(), actual.getCreditHours());
    eq.append(expected.getCreationDate(), actual.getCreationDate());

    return eq.isEquals();
  }
 @Override
 public boolean equals(Object o) {
   if (o == null) {
     return false;
   }
   if (!(o instanceof AccountDetails)) {
     return false;
   }
   AccountDetails rhs = (AccountDetails) o;
   EqualsBuilder b = new EqualsBuilder();
   b.append(queriesRemaining, rhs.queriesRemaining);
   b.append(maxmindId, rhs.maxmindId);
   b.append(minFraudVersion, rhs.minFraudVersion);
   b.append(serviceLevel, rhs.serviceLevel);
   return b.isEquals();
 }
 /*
  * (non-Javadoc)
  * @see org.hamcrest.Matcher#matches(java.lang.Object)
  */
 @Override
 public boolean matches(final Object item) {
   boolean match = false;
   if (item instanceof ResourceCategoryEntity) {
     final ResourceCategoryEntity actual = (ResourceCategoryEntity) item;
     final EqualsBuilder matcher = new EqualsBuilder();
     matcher.appendSuper(
         actual
             .getURI()
             .toString()
             .endsWith(
                 "/resourceManager/componentName5/resources/categories/" + expected.getId()));
     matcher.append(expected.getId(), actual.getId());
     matcher.append(expected.getName(), actual.getName());
     matcher.append(expected.getDescription(), actual.getDescription());
     match = matcher.isEquals();
   }
   return match;
 }
示例#23
0
 @Override
 public boolean equals(Object obj) {
   // TODO Auto-generated method stub
   return EqualsBuilder.reflectionEquals(this, obj);
 }
 @Override
 public boolean equals(Object o) {
   return EqualsBuilder.reflectionEquals(this, o);
 }
示例#25
0
 public boolean equals(Object obj) {
   return EqualsBuilder.reflectionEquals(this, obj, "listNews");
 }
示例#26
0
文件: Pair.java 项目: GitHug/pair
  /**
   * Equals method ignoring the case of the members of <tt>o</tt>. In the case that <tt>o</tt>
   * doesn't contain any String and/or this object doesn't contain any String, it is treated as the
   * normal equals method. Here is an example:
   *
   * <p>Pair<String, String> p0 = new Pair<String, String>("A", "B"); Pair<String, String> p1 = new
   * Pair<String, String>("a", "b"); p0.equals(p1) //true
   *
   * @param o The object to be compared with this object
   * @return true if o is equal to this object while ignoring the case of potential Strings.
   */
  public boolean equalsIgnoreCase(Object o) {
    if (o == null) {
      return false;
    } else if (getClass() != o.getClass()) {
      return false;
    }

    @SuppressWarnings("unchecked")
    Pair<X, Y> pair = (Pair<X, Y>) o;

    if (pair.x == null || pair.y == null || x == null || y == null) {
      return false;
    }

    EqualsBuilder eq0 = new EqualsBuilder();
    EqualsBuilder eq1 = new EqualsBuilder();

    if (!(x instanceof String || y instanceof String)
        || !(pair.x instanceof String || pair.y instanceof String)) {
      return equals(pair);
    }

    if (x instanceof String) {
      String xs = (String) x;
      if (pair.x instanceof String) {
        String ps = (String) pair.x;
        eq0.append(xs.toLowerCase(), ps.toLowerCase());
      } else {
        eq0.append(x, pair.x);
      }
      if (pair.y instanceof String) {
        String ps = (String) pair.y;
        eq1.append(xs.toLowerCase(), ps.toLowerCase());
      } else {
        eq1.append(x, pair.y);
      }
    }

    if (y instanceof String) {
      String ys = (String) y;
      if (pair.x instanceof String) {
        String ps = (String) pair.x;
        eq1.append(ys.toLowerCase(), ps.toLowerCase());
      } else {
        eq1.append(y, pair.x);
      }

      if (pair.y instanceof String) {
        String ps = (String) pair.y;
        eq0.append(ys.toLowerCase(), ps.toLowerCase());
      } else {
        eq0.append(y, pair.y);
      }
    }
    return eq0.isEquals() || eq1.isEquals();
  }
 @Override
 public boolean equals(Object obj) {
   return EqualsBuilder.reflectionEquals(this, obj, "proyecto");
 }
示例#28
0
 @SuppressWarnings("EqualsWhichDoesntCheckParameterClass")
 @Override
 public boolean equals(Object other) {
   return EqualsBuilder.reflectionEquals(this, other);
 }
示例#29
0
 /**
  * {@inheritDoc}
  *
  * @see edu.hm.basic.object.AbstractBasicObject#equals(java.lang.Object)
  */
 @Override
 public boolean equals(Object obj) {
   return EqualsBuilder.reflectionEquals(
       this, obj, true, TwitterMessage.class, getExclusionList());
 }
示例#30
0
 @Override
 public boolean equals(final Object obj) {
   return EqualsBuilder.reflectionEquals(this, obj);
 }