Examples of CompareToBuilder


Examples of net.emaze.dysfunctional.order.CompareToBuilder

        this.comparator = comparator;
    }

    @Override
    public int compare(Range<T> lhs, Range<T> rhs) {
        return new CompareToBuilder().append(!lhs.iterator().hasNext(), !rhs.iterator().hasNext()).
                append(Maybe.just(lhs.begin()), Maybe.just(rhs.begin()), comparator).
                append(rhs.end(), lhs.end(), comparator).
                toComparison();
    }
View Full Code Here

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

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

            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

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

          .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

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

          .isEquals();
  }

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

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

        }
        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

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

            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

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

  }

  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

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

  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

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

                "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
TOP
Copyright © 2018 www.massapi.com. 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.