KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > planetamessenger > mos > engine > JDataField


1 /*
2     =========================================================================
3     Package engine - Implements the engine package.
4
5     This module is developed and maintained by PlanetaMessenger.org.
6     Specs, New and updated versions can be found in
7     http://www.planetamessenger.org
8     If you want contact the Team please send a email to Project Manager
9     Leidson Campos Alves Ferreira at leidson@planetamessenger.org
10
11     Copyright (C) since 2001 by PlanetaMessenger.org
12
13     This program is free software; you can redistribute it and/or modify
14     it under the terms of the GNU General Public License as published by
15     the Free Software Foundation; either version 2 of the License, or
16     (at your option) any later version.
17
18     This program is distributed in the hope that it will be useful,
19     but WITHOUT ANY WARRANTY; without even the implied warranty of
20     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21     GNU General Public License for more details.
22
23     You should have received a copy of the GNU General Public License
24     along with this program; if not, write to the Free Software
25     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26
27     =========================================================================
28 */

29 /**
30  *
31  * $Id: JDataField.java,v 1.4 2007/01/28 17:39:20 popolony2k Exp $
32  * $Author: popolony2k $
33  * $Name: $
34  * $Revision: 1.4 $
35  * $State: Exp $
36  *
37  */

38
39 package org.planetamessenger.mos.engine;
40
41
42
43 public class JDataField {
44   
45   private String JavaDoc strKeyName;
46   private String JavaDoc strDescription;
47   private Object JavaDoc objValue;
48   
49   
50   /**
51    * Constructor. Initializes all class data.<br>
52    * @param strKeyName The key field name;<br>
53    * @param strDescription The object description;<br>
54    * @param objValue The object value;<br>
55    **/

56   public JDataField( String JavaDoc strKeyName, String JavaDoc strDescription, Object JavaDoc objValue ) {
57     
58     this.strKeyName = strKeyName;
59     this.strDescription = strDescription;
60     this.objValue = objValue;
61   }
62   
63   /**
64    * Get the field key name.
65    */

66   public String JavaDoc getKeyName() {
67    
68     return strKeyName;
69   }
70   
71   /**
72    * Get the field key value.
73    */

74   public Object JavaDoc getObject() {
75     
76     return objValue;
77   }
78   
79   /**
80    * Override the toString base method.
81    */

82   public String JavaDoc toString() {
83     
84     return strDescription;
85   }
86 }
87
88 // JDataField class
89
Popular Tags