Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/memoire/foo/FooComma.java


1   /**
2    * @modification $Date: 2001/12/03 16:28:08 $
3    * @statut       unstable
4    * @file         FooComma.java
5    * @version      0.08
6    * @author       Guillaume Desnoix
7    * @email        guillaume@desnoix.com
8    * @license      GNU General Public License 2 (GPL2)
9    * @copyright    1999-2001 Guillaume Desnoix
10   */
11  
12  package com.memoire.foo;
13  import com.memoire.foo.*;
14  
15  public class FooComma
16         implements FooEval
17  {
18    private Object value_;
19  
20    public FooComma(Object _value)
21    {
22      value_=_value;
23    }
24  
25    // not public
26    Object value()
27    {
28      return value_;
29    }
30  
31    public Object eval()
32    {
33      return FooLib.eval(value_);
34    }
35    
36    public String toString()
37    {
38      return ","+value_;
39    }
40  
41    public String toSource()
42    {
43      return ","+FooLib.toSource(value_);
44    }
45  
46    public int hashCode()
47    {
48      return 2+(value_!=null ? value_.hashCode() : 0);
49    }
50  
51    public boolean equals(Object _o)
52    {
53      if(_o==this) return true;
54      if(_o==null) return false;
55  
56      return
57          (_o instanceof FooComma)
58        &&FooObject.eqMsg(value(),((FooComma)_o).value()).booleanValue();
59    }
60  }
61