01: /*
02: * JFolder, Copyright 2001-2006 Gary Steinmetz
03: *
04: * Distributable under LGPL license.
05: * See terms of license at gnu.org.
06: */
07:
08: package org.jfolder.common;
09:
10: //base classes
11: import java.io.PrintStream;
12: import java.io.PrintWriter;
13:
14: //project specific classes
15:
16: //other classes
17:
18: public class ImmutablePreFormattedHtml {
19:
20: //
21: private String value = null;
22:
23: //
24: private ImmutablePreFormattedHtml(String inValue) {
25: this .value = inValue;
26: }
27:
28: public final static ImmutablePreFormattedHtml newInstance(
29: String inValue) {
30:
31: ImmutablePreFormattedHtml outValue = null;
32:
33: outValue = new ImmutablePreFormattedHtml(inValue);
34:
35: return outValue;
36: }
37:
38: //
39: public String getValue() {
40: return this .value;
41: }
42:
43: //
44: public boolean equals(Object inObject) {
45:
46: boolean outValue = false;
47:
48: if (inObject != null
49: && inObject instanceof ImmutablePreFormattedHtml) {
50: ImmutablePreFormattedHtml ipfh = (ImmutablePreFormattedHtml) inObject;
51: outValue = this .value.equals(ipfh.value);
52: }
53:
54: return outValue;
55: }
56:
57: public int hashCode() {
58: return this .value.hashCode();
59: }
60:
61: //
62: public String toString() {
63: return this.value;
64: }
65:
66: }
|