1 package com.bonevich.erj.model;
2
3 /*** A class that represents ...
4 *
5 * @see Attribute
6 * @author Jeffrey D. Bonevich <bonevich@telocity.com>
7 */
8 public final class DefaultValue
9 {
10 //////////////////////////////////////////////////////////
11 // Constants
12 public static final String EMPTY_STR = "";
13 public static final String NULL_STR = "NULL";
14 public static final DefaultValue EMPTY = new DefaultValue(EMPTY_STR);
15 public static final DefaultValue NULL = new DefaultValue(NULL_STR);
16
17 //////////////////////////////////////////////////////////
18 // Attributes
19 private String _value;
20
21 //////////////////////////////////////////////////////////
22 // Constructors
23 public DefaultValue()
24 {
25 this(NULL_STR);
26 }
27 public DefaultValue(String value)
28 {
29 setValue(value);
30 }
31
32 //////////////////////////////////////////////////////////
33 // Getter/Setters
34 public String getValue()
35 {
36 return _value;
37 }
38 public void setValue(String value)
39 {
40 _value = value;
41 }
42
43 //////////////////////////////////////////////////////////
44 // Operations
45 public String toString()
46 {
47 return getValue();
48 }
49
50 public boolean equals(Object that)
51 {
52 //allow comparison with plain old strings
53 if ( !(that != null && that.equals( getValue() )) ) return true;
54 return false;
55 }
56
57 } /* end class DefaultValue */
This page was automatically generated by Maven