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: import org.apache.commons.lang.builder.EqualsBuilder;
14: import org.apache.commons.lang.builder.HashCodeBuilder;
15:
16: import java.io.IOException;
17: import java.io.ObjectInputStream;
18: import java.io.ObjectOutputStream;
19:
20: public class SerializableFive extends SerializableOne {
21:
22: private static final long serialVersionUID = 1L;
23: private int two;
24: private boolean three;
25: private char four;
26: private StringBuffer five;
27:
28: public SerializableFive(String one, int two, boolean three,
29: char four, StringBuffer five) {
30: super (one);
31: this .two = two;
32: this .three = three;
33: this .four = four;
34: this .five = five;
35: }
36:
37: private void writeObject(final ObjectOutputStream out)
38: throws IOException {
39: out.defaultWriteObject();
40: }
41:
42: private void readObject(final ObjectInputStream in)
43: throws IOException, ClassNotFoundException {
44: in.defaultReadObject();
45: }
46:
47: public boolean equals(Object obj) {
48: return EqualsBuilder.reflectionEquals(this , obj);
49: }
50:
51: public int hashCode() {
52: return HashCodeBuilder.reflectionHashCode(this);
53: }
54: }
|