KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > medor > expression > api > Operand


1 /**
2  * MEDOR: Middleware Enabling Distributed Object Requests
3  *
4  * Copyright (C) 2001-2003 France Telecom R&D
5  * Contact: alexandre.lefebvre@rd.francetelecom.com
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  *
21  * Initial developers: M. Alia, A. Lefebvre
22  */

23
24 package org.objectweb.medor.expression.api;
25
26 import java.math.BigDecimal JavaDoc;
27 import java.math.BigInteger JavaDoc;
28 import java.util.Date JavaDoc;
29
30 /**
31  * This interface represents a byte, char, int,...or an object value.
32  * <p>When
33  * of primitive type, widing conversions allowed by the Java programming
34  * language are used to get the value in different types.
35  * <p>
36  * Each getXXX() method returns the operand value of the XXX type.
37  */

38 public interface Operand extends Expression {
39
40     /**
41      * get the operand result as a boolean value
42      * @return a boolean value
43      * @throws org.objectweb.medor.expression.api.TypingException if it is impossible to return a boolean value
44      */

45     boolean getBoolean() throws TypingException;
46
47     /**
48      * get the operand result as a byte value
49      * @return an int value
50      * @throws org.objectweb.medor.expression.api.TypingException if it is impossible to return an int value
51      */

52     int getInt() throws TypingException;
53
54     /**
55      * get the operand result as a byte value
56      * @return a byte value
57      * @throws org.objectweb.medor.expression.api.TypingException if it is impossible to return an int value
58      */

59     byte getByte() throws TypingException;
60
61     /**
62      * get the operand result as a byte[] value
63      * @return a byte[] value
64      * @throws org.objectweb.medor.expression.api.TypingException if it is impossible to return an int value
65      */

66     byte[] getByteArray() throws TypingException;
67
68     /**
69      * get the operand result as a short value
70      * @return a short value
71      * @throws org.objectweb.medor.expression.api.TypingException if it is impossible to return a short value
72      */

73     short getShort() throws TypingException;
74
75     /**
76      * get the operand result as a long value
77      * @return a long value
78      * @throws org.objectweb.medor.expression.api.TypingException if it is impossible to return a long value
79      */

80     long getLong() throws TypingException;
81
82     /**
83      * get the operand result as a float value
84      * @return a float value
85      * @throws org.objectweb.medor.expression.api.TypingException if it is impossible to return a float value;
86      */

87     float getFloat() throws TypingException;
88
89     /**
90      * get the operand result as a double value
91      * @return a double value
92      * @throws org.objectweb.medor.expression.api.TypingException if it is impossible to return a double value
93      */

94     double getDouble() throws TypingException;
95
96     /**
97      * get the operand result as a char value
98      * @return a char value
99      * @throws org.objectweb.medor.expression.api.TypingException if it is impossible to return a char value;
100      */

101     char getChar() throws TypingException;
102
103     /**
104      * get the operand result as a char[] value
105      * @return a char[] value
106      * @throws org.objectweb.medor.expression.api.TypingException if it is impossible to return a char value;
107      */

108     char[] getCharArray() throws TypingException;
109
110     /**
111      * evalute the expression result and return a string value
112      * @return string result
113      * @throws org.objectweb.medor.expression.api.TypingException if it is impossible to return a string value
114      */

115     String JavaDoc getString() throws TypingException;
116
117     /**
118      * evalute the expression result and return a BigDecimal value
119      * @return BigDecimal result
120      * @throws org.objectweb.medor.expression.api.TypingException if it is impossible to return a string value
121      */

122     BigDecimal JavaDoc getBigDecimal() throws TypingException;
123
124     /**
125      * evalute the expression result and return a BigInteger value
126      * @return BigInteger result
127      * @throws org.objectweb.medor.expression.api.TypingException if it is impossible to return a string value
128      */

129     BigInteger JavaDoc getBigInteger() throws TypingException;
130
131     /**
132      * get the operand result a java.util.Date value
133      * @return a date value
134      * @throws org.objectweb.medor.expression.api.TypingException if it is impossible to return java.util.Date
135      */

136     Date JavaDoc getDate() throws TypingException;
137
138     /**
139      * get the operand result as a java.lang.Object value
140      * @return an object
141      */

142     Object JavaDoc getObject();
143
144     /**
145      * Indicates if the operand has been defined, ie is the value returned if
146      * pertinent
147      */

148     boolean isDefined();
149
150     void setIsDefined(boolean isdefined);
151 }
152
Popular Tags