Package org.apache.commons.lang.builder

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


  /**
   * ε­εŒ…δΌ˜ε…ˆ
   */
  public int compareTo(Profile other) {
    return new CompareToBuilder().append(other.actionPattern, this.actionPattern).toComparison();
  }
View Full Code Here


            return "AdapterDescription [adaptable=" + this.adaptable + ", adapters=" + Arrays.toString(this.adapters)
                            + ", condition=" + this.condition + ", bundle=" + this.bundle + ", deprecated= " + this.deprecated + "]";
        }

        public int compareTo(final AdaptableDescription o) {
            return new CompareToBuilder().append(this.adaptable, o.adaptable).append(this.condition, o.condition)
                            .append(this.adapters.length, o.adapters.length)
                            .append(this.bundle.getBundleId(), o.bundle.getBundleId()).toComparison();
        }
View Full Code Here

          .isEquals();
  }
 
  @Override
  public int compareTo(ArtistPlayCount apc) {
    CompareToBuilder ctb = new CompareToBuilder();
    ctb.append(-playCount, -apc.playCount);
    ctb.append(artist.getName(), apc.artist.getName());
   
    return ctb.toComparison();
  }
View Full Code Here

          .isEquals();
  }

  @Override
  public int compareTo(Track t) {
    return new CompareToBuilder()
    .append(artist, t.artist)
    .append(name, t.name).toComparison();
  }
View Full Code Here

        }
        return transportables;
    }

    public int compareTo(final Transport other) {
        return new CompareToBuilder()
                .append(transportYear, other.transportYear).append(
                        transportWeek, other.transportWeek).append(
                        transportName, other.transportName).toComparison();
    }
View Full Code Here

            Integer order1 = Util.nullToInteger1000(orderLine.getDialogOrder());
            Integer order2 = Util.nullToInteger1000(other.orderLine.getDialogOrder());
            int returnValue;

            if (orderLine.getDialogOrder() == null && other.orderLine.getDialogOrder() == null) {
                returnValue = new CompareToBuilder().append(nameString, other.nameString).toComparison();
            } else {
                returnValue = new CompareToBuilder().append(order1, order2).toComparison();
            }

            if (returnValue == 0 && !equals(other)) {
                returnValue = new CompareToBuilder().append(nameString, other.nameString).toComparison();
            }

            return returnValue;
        }
View Full Code Here

  }

  private class SupplierComparator implements Comparator<Supplier> {

    public int compare(Supplier supplier1, Supplier supplier2) {
      return new CompareToBuilder().append(supplier1.getPostalCode(),
          supplier2.getPostalCode()).toComparison();
    }
View Full Code Here

  public void setSupplier(Supplier supplier) {
    this.supplier = supplier;
  }

    public int compareTo(final Employee other) {
        return new CompareToBuilder().append(firstName, other.firstName)
                .append(lastName, other.lastName).toComparison();
    }
View Full Code Here

                "orderCommentCommentTypeId", orderCommentCommentTypeId).append(
                "orderComment", orderComment)
                .append("commentType", commentType).toString();
    }
    public int compareTo(final OrderCommentCommentType other) {
        return new CompareToBuilder().append(orderComment, other.orderComment)
                .append(commentType, other.commentType).toComparison();
    }
View Full Code Here

   * @param other
   * @return sammenlikning
   * @see java.lang.Comparable#compareTo(java.lang.Object)
   */
  public final int compareTo(final Assembly other) {
    return new CompareToBuilder().append(supplier, other.supplier).append(
        assemblyYear, other.assemblyYear).append(assemblyWeek,
        other.assemblyWeek)// .append(comment, other.comment)
        .toComparison();
  }
View Full Code Here

TOP

Related Classes of org.apache.commons.lang.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.