cafe-endpointdsl/src/main/java/org/apache/camel/example/cafe/OrderItem.java [21:76]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class OrderItem {

    private DrinkType type;

    private int shots = 1;

    private boolean iced;

    private final Order order;

    public OrderItem(Order order, DrinkType type, int shots, boolean iced) {
        this.order = order;
        this.type = type;
        this.shots = shots;
        this.iced = iced;
    }

    public Order getOrder() {
        return this.order;
    }

    public boolean isIced() {
        return this.iced;
    }

    public int getShots() {
        return shots;
    }

    public DrinkType getDrinkType() {
        return this.type;
    }

    @Override
    public String toString() {
        return ((this.iced) ? "iced " : "hot ") + this.shots + " shot " + this.type;
    }
    
    @Override
    public boolean equals(Object o) {
        if (o instanceof OrderItem) {
            OrderItem that = (OrderItem)o;
            return ObjectHelper.equal(this.type, that.type) 
                && ObjectHelper.equal(this.order.getNumber(), that.order.getNumber())
                && ObjectHelper.equal(this.iced, that.iced)
                && ObjectHelper.equal(this.shots, that.shots);                 
        }
        return false;
    }
  
    @Override
    public int hashCode() {
        if (iced) {
            return type.hashCode() + order.getNumber() * 10000 + shots * 100;
        } else {
            return type.hashCode() + order.getNumber() * 10000 + shots * 100 + 5;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



cafe/src/main/java/org/apache/camel/example/cafe/OrderItem.java [21:76]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class OrderItem {

    private DrinkType type;

    private int shots = 1;

    private boolean iced;

    private final Order order;

    public OrderItem(Order order, DrinkType type, int shots, boolean iced) {
        this.order = order;
        this.type = type;
        this.shots = shots;
        this.iced = iced;
    }

    public Order getOrder() {
        return this.order;
    }

    public boolean isIced() {
        return this.iced;
    }

    public int getShots() {
        return shots;
    }

    public DrinkType getDrinkType() {
        return this.type;
    }

    @Override
    public String toString() {
        return ((this.iced) ? "iced " : "hot ") + this.shots + " shot " + this.type;
    }
    
    @Override
    public boolean equals(Object o) {
        if (o instanceof OrderItem) {
            OrderItem that = (OrderItem)o;
            return ObjectHelper.equal(this.type, that.type) 
                && ObjectHelper.equal(this.order.getNumber(), that.order.getNumber())
                && ObjectHelper.equal(this.iced, that.iced)
                && ObjectHelper.equal(this.shots, that.shots);                 
        }
        return false;
    }
  
    @Override
    public int hashCode() {
        if (iced) {
            return type.hashCode() + order.getNumber() * 10000 + shots * 100;
        } else {
            return type.hashCode() + order.getNumber() * 10000 + shots * 100 + 5;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



