/*
 * Copyright (C) 2007 XStream Committers.
 * All rights reserved.
 *
 * The software in this package is published under the terms of the BSD
 * style license a copy of which has been included with this distribution in
 * the LICENSE.txt file.
 * 
 * Created on 30. April 2007 by Joerg Schaible
 */
package com.thoughtworks.acceptance.objects;

import java.util.ArrayList;


public class Product {

    String name;
    String id;
    double price;
    ArrayList tags;

    public Product(String name, String id, double price) {
        super();
        this.name = name;
        this.id = id;
        this.price = price;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public ArrayList getTags() {
        return tags;
    }

    public void setTags(ArrayList tags) {
        this.tags = tags;
    }

    public String toString() {
        String ret = "[" + name + ", " + id + ", " + price;
        if (tags != null) {
            ret += "\n{";
            for (java.util.Iterator it = tags.iterator(); it.hasNext();) {
                String tag = (String)it.next();
                ret += tag + "\n";
            }
            ret += "}";
        }
        ret += "]";
        return ret;
    }

}

@@ -17,16 +17,22 @@
 (C) 2007
+, 2013
  XStream
@@ -1142,32 +1142,1313 @@
  = tags;%0A    %7D%0A%0A
+    public int hashCode() %7B%0A        final int prime = 31;%0A        int result = 1;%0A        result = prime * result + ((this.id == null) ? 0 : this.id.hashCode());%0A        result = prime * result + ((this.name == null) ? 0 : this.name.hashCode());%0A        long temp;%0A        temp = Double.doubleToLongBits(this.price);%0A        result = prime * result + (int)(temp %5E (temp %3E%3E%3E 32));%0A        result = prime * result + ((this.tags == null) ? 0 : this.tags.hashCode());%0A        return result;%0A    %7D%0A%0A    public boolean equals(Object obj) %7B%0A        if (this == obj) return true;%0A        if (obj == null) return false;%0A        if (getClass() != obj.getClass()) return false;%0A        Product other = (Product)obj;%0A        if (this.id == null) %7B%0A            if (other.id != null) return false;%0A        %7D else if (!this.id.equals(other.id)) return false;%0A        if (this.name == null) %7B%0A            if (other.name != null) return false;%0A        %7D else if (!this.name.equals(other.name)) return false;%0A        if (Double.doubleToLongBits(this.price) != Double.doubleToLongBits(other.price))%0A            return false;%0A        if (this.tags == null) %7B%0A            if (other.tags != null) return false;%0A        %7D else if (!this.tags.equals(other.tags)) return false;%0A        return true;%0A    %7D%0A%0A
     public Strin

Implement equals and hashCode for Product.