Subversion Repositories SmartDukaan

Rev

Rev 21640 | Rev 23467 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21640 Rev 21924
Line 29... Line 29...
29
		return type;
29
		return type;
30
	}
30
	}
31
	public void setType(ItemType type) {
31
	public void setType(ItemType type) {
32
		this.type = type;
32
		this.type = type;
33
	}
33
	}
-
 
34
 
-
 
35
	@Override
-
 
36
	public int hashCode() {
-
 
37
		final int prime = 31;
-
 
38
		int result = 1;
-
 
39
		result = prime * result + itemId;
-
 
40
		result = prime * result + Float.floatToIntBits(quantity);
-
 
41
		result = prime * result + ((type == null) ? 0 : type.hashCode());
-
 
42
		return result;
-
 
43
	}
-
 
44
 
-
 
45
	@Override
-
 
46
	public boolean equals(Object obj) {
-
 
47
		if (this == obj)
-
 
48
			return true;
-
 
49
		if (obj == null)
-
 
50
			return false;
-
 
51
		if (getClass() != obj.getClass())
-
 
52
			return false;
-
 
53
		ItemIdTypeQuantity other = (ItemIdTypeQuantity) obj;
-
 
54
		if (itemId != other.itemId)
-
 
55
			return false;
-
 
56
		if (Float.floatToIntBits(quantity) != Float.floatToIntBits(other.quantity))
-
 
57
			return false;
-
 
58
		if (type != other.type)
-
 
59
			return false;
-
 
60
		return true;
-
 
61
	}
-
 
62
 
-
 
63
	@Override
-
 
64
	public String toString() {
-
 
65
		return "ItemIdTypeQuantity [itemId=" + itemId + ", type=" + type + ", quantity=" + quantity + "]";
-
 
66
	}
-
 
67
	
-
 
68
	
34
}
69
}