Source Code Cross Referenced for NameValue.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » cPlanner » classes » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » pegasus 2.1.0 » org.griphyn.cPlanner.classes 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * This file or a portion of this file is licensed under the terms of
003:         * the Globus Toolkit Public License, found in file GTPL, or at
004:         * http://www.globus.org/toolkit/download/license.html. This notice must
005:         * appear in redistributions of this file, with or without modification.
006:         *
007:         * Redistributions of this Software, with or without modification, must
008:         * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
009:         * some other similar material which is provided with the Software (if
010:         * any).
011:         *
012:         * Copyright 1999-2004 University of Chicago and The University of
013:         * Southern California. All rights reserved.
014:         */
015:
016:        package org.griphyn.cPlanner.classes;
017:
018:        /**
019:         * The object of this class holds the name value pair.
020:         * At present to be used for environment variables. Will be used more
021:         * after integration of Spitfire.
022:         *
023:         * @author Karan Vahi
024:         * @author Gaurang Mehta
025:         * @version $Revision: 50 $
026:         */
027:        public class NameValue extends Data implements  Comparable {
028:
029:            /**
030:             * stores the name of the pair.
031:             */
032:            private String name;
033:
034:            /**
035:             * stores the corresponding value to the name in the pair.
036:             */
037:            private String value;
038:
039:            /**
040:             * the default constructor  which initialises the class member variables.
041:             */
042:            public NameValue() {
043:                name = new String();
044:                value = new String();
045:            }
046:
047:            /**
048:             * Initialises the class member variables to the values passed in the
049:             * arguments.
050:             *
051:             * @param name  corresponds to the name in the NameValue pair.
052:             * @param value corresponds to the value for the name in the NameValue pair.
053:             */
054:            public NameValue(String name, String value) {
055:                this .name = name;
056:                this .value = value;
057:            }
058:
059:            /**
060:             * Returns the key associated with this tuple.
061:             *
062:             * @return the key associated with the tuple.
063:             */
064:            public String getKey() {
065:                return this .name;
066:            }
067:
068:            /**
069:             * Returns the value associated with this tuple.
070:             *
071:             * @return value associated with the tuple.
072:             */
073:            public String getValue() {
074:                return this .value;
075:            }
076:
077:            /**
078:             * Returns a copy of this object
079:             *
080:             * @return object containing a cloned copy of the tuple.
081:             */
082:            public Object clone() {
083:                NameValue nv = new NameValue(this .name, this .value);
084:                return nv;
085:
086:            }
087:
088:            /**
089:             * Writes out the contents of the class to a String
090:             * in form suitable for displaying.
091:             *
092:             * @return the textual description.
093:             */
094:            public String toString() {
095:                String str = this .getKey() + "=" + this .getValue();
096:                return str;
097:            }
098:
099:            /**
100:             * Implementation of the {@link java.lang.Comparable} interface.
101:             * Compares this object with the specified object for order. Returns a
102:             * negative integer, zero, or a positive integer as this object is
103:             * less than, equal to, or greater than the specified object. The
104:             * NameValue are compared by their keys.
105:             *
106:             * @param o is the object to be compared
107:             * @return a negative number, zero, or a positive number, if the
108:             * object compared against is less than, equals or greater than
109:             * this object.
110:             * @exception ClassCastException if the specified object's type
111:             * prevents it from being compared to this Object.
112:             */
113:            public int compareTo(Object o) {
114:                if (o instanceof  NameValue) {
115:                    NameValue nv = (NameValue) o;
116:                    return this .name.compareTo(nv.name);
117:                } else {
118:                    throw new ClassCastException("Object is not a NameValue");
119:                }
120:            }
121:
122:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.