01: /*
02: * Copyright (C) 2008 XStream Committers.
03: * All rights reserved.
04: *
05: * The software in this package is published under the terms of the BSD
06: * style license a copy of which has been included with this distribution in
07: * the LICENSE.txt file.
08: *
09: * Created on 01. January 2008 by Joerg Schaible
10: */
11: package com.thoughtworks.xstream.benchmark.cache.model;
12:
13: public class Five extends One {
14:
15: private int two;
16: private boolean three;
17: private char four;
18: private StringBuffer five;
19:
20: public Five(String one, int two, boolean three, char four,
21: StringBuffer five) {
22: super (one);
23: this .two = two;
24: this .three = three;
25: this .four = four;
26: this .five = five;
27: }
28:
29: public boolean equals(Object obj) {
30: Five five = (Five) obj;
31: return super .equals(obj) && two == five.two
32: && three == five.three && four == five.four
33: && this .five.toString().equals(five.five.toString());
34: }
35:
36: public int hashCode() {
37: return super .hashCode() + two + new Boolean(three).hashCode()
38: + five.toString().hashCode();
39: }
40: }
|