01: /*
02: * Copyright (C) 2006 Joe Walnes.
03: * Copyright (C) 2006, 2007 XStream Committers.
04: * All rights reserved.
05: *
06: * The software in this package is published under the terms of the BSD
07: * style license a copy of which has been included with this distribution in
08: * the LICENSE.txt file.
09: *
10: * Created on 15. July 2006 by Joe Walnes
11: */
12: package com.thoughtworks.xstream.tools.benchmark.targets;
13:
14: import com.thoughtworks.xstream.tools.benchmark.Target;
15:
16: /**
17: * A small java.lang.String target.
18: *
19: * @author Joe Walnes
20: * @see com.thoughtworks.xstream.tools.benchmark.Harness
21: * @see Target
22: */
23: public class StringTarget implements Target {
24:
25: private final String string = "Hello World!";
26:
27: public String toString() {
28: return "Simple string";
29: }
30:
31: public Object target() {
32: return string;
33: }
34:
35: public boolean isEqual(Object other) {
36: return string.equals(other);
37: }
38:
39: }
|