Package org.apache.commons.lang3.builder

Examples of org.apache.commons.lang3.builder.CompareToBuilder


        this.university = university;
    }

    @Override
    public int compareTo(PersonEducationInfo other) {
        return new CompareToBuilder().append(this.fromDate, other.fromDate)
                .build();
    }
View Full Code Here


     *
     * @param other  the other pair, not null
     * @return negative if this is less, zero if equal, positive if greater
     */
    public int compareTo(Pair<L, R> other) {
      return new CompareToBuilder().append(getLeft(), other.getLeft())
              .append(getRight(), other.getRight()).toComparison();
    }
View Full Code Here

     * @param other  the other triple, not null
     * @return negative if this is less, zero if equal, positive if greater
     */
    @Override
    public int compareTo(final Triple<L, M, R> other) {
      return new CompareToBuilder().append(getLeft(), other.getLeft())
          .append(getMiddle(), other.getMiddle())
          .append(getRight(), other.getRight()).toComparison();
    }
View Full Code Here

     * @param other  the other pair, not null
     * @return negative if this is less, zero if equal, positive if greater
     */
    @Override
    public int compareTo(final Pair<L, R> other) {
      return new CompareToBuilder().append(getLeft(), other.getLeft())
              .append(getRight(), other.getRight()).toComparison();
    }
View Full Code Here

     * @param other  the other triple, not null
     * @return negative if this is less, zero if equal, positive if greater
     */
    @Override
    public int compareTo(final Triple<L, M, R> other) {
        return new CompareToBuilder().append(getLeft(), other.getLeft()).append(getMiddle(), other.getMiddle()).append(getRight(), other.getRight()).toComparison();
    }
View Full Code Here

     * @param other  the other pair, not null
     * @return negative if this is less, zero if equal, positive if greater
     */
    @Override
    public int compareTo(final Pair<L, R> other) {
      return new CompareToBuilder().append(getLeft(), other.getLeft())
              .append(getRight(), other.getRight()).toComparison();
    }
View Full Code Here

     * @param other  the other triple, not null
     * @return negative if this is less, zero if equal, positive if greater
     */
    @Override
    public int compareTo(final Triple<L, M, R> other) {
      return new CompareToBuilder().append(getLeft(), other.getLeft())
          .append(getMiddle(), other.getMiddle())
          .append(getRight(), other.getRight()).toComparison();
    }
View Full Code Here

    @Override
    public boolean equals(final Object other) {
      if (!(other instanceof RowColIndex))
        return false;
      RowColIndex castOther = (RowColIndex) other;
      return new EqualsBuilder().append(rowKey, castOther.rowKey).append(colIndex, castOther.colIndex)
          .isEquals();
    }
View Full Code Here

  public boolean equals(Object obj) {
    if (obj == null) return false;
    if (obj == this) return true;
    if (Purchaser.class.isAssignableFrom(obj.getClass())) {
      final Purchaser other = Purchaser.class.cast(obj);
      return new EqualsBuilder().append(this.id, other.id)
          .append(this.name, other.name)
          .append(this.address, other.address)
          .append(this.nip, other.nip).isEquals();
      }
      return false;
View Full Code Here

        {
            return false;
        }

        QueryResult<?> c = (QueryResult<?>) obj;
        return new EqualsBuilder().append(getNode(), c.getNode())
                .append(getAttributeName(), c.getAttributeName()).isEquals();
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.lang3.builder.CompareToBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.