incubator-imperius-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke...@apache.org
Subject svn commit: r611261 [17/43] - in /incubator/imperius/trunk: ./ imperius-javaspl/ imperius-javaspl/src/main/java/org/apache/imperius/javaspl/ imperius-splcore/ imperius-splcore/src/main/antlr/org/apache/imperius/spl/parser/compiler/ imperius-splcore/src...
Date Fri, 11 Jan 2008 18:57:14 GMT
Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Division.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Division.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Division.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Division.java Fri Jan 11 10:56:30 2008
@@ -1,237 +1,237 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Prashant Baliga <prabalig@in.ibm.com>
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.external.TypeConstants;
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.DoubleArgumentExpression;
-import org.apache.imperius.spl.parser.expressions.NumericExpression;
-import org.apache.imperius.spl.parser.util.TypeInfo;
-import org.apache.imperius.spl.parser.util.TypeResolver;
-import org.apache.imperius.util.SPLLogger;
-
-
-/**
- * 
- * @author Xiping Change Log: 1. 3/9/07: Neeraj Joshi: Changed constructor to
- *         take a list to facilitate reflection in the expression factory 2.
- *         3/9/07: Neeraj Joshi: Changed the algorithm which determines return
- *         type to use numeric promotion
- * 
- */
-public class Division extends DoubleArgumentExpression implements
-	NumericExpression
-{
-    
-    public static final String className = Division.class.getName();
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="Division";
-    
-    
-    
-    public Division(List exprList, boolean validateExpression)
-    throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Division");
-        
-        if (validateExpression)
-        {
-            if (!validate())
-            {
-                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
-                        + " has wrong data type passed in.");
-                
-                throw new SPLException("validation error: " + className
-                        + " has wrong data type passed in.");
-            }
-        }
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Division");
-        
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-        
-        try
-        {
-            if(logger.isLoggable(Level.FINE))
-                logger.fine(Thread.currentThread().getName()+" LHS/RHS "+_lhsExp.toString()+"/"+_rhsExp.toString());
-            
-            Number lhs = (Number) _lhsExp.evaluate();
-            Number rhs = (Number) _rhsExp.evaluate();
-            
-            if(logger.isLoggable(Level.FINE))
-                logger.fine(Thread.currentThread().getName()+" LHS,RHS::"+lhs+","+rhs);
-            
-            Number result=division(lhs, rhs);
-            if(logger.isLoggable(Level.FINE))
-                logger.fine(Thread.currentThread().getName()+" division result ::"+lhs+"/"+rhs+"="+result);
-            
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-            
-            return result;
-        }
-        catch (Exception e)
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
-            
-            throw new SPLException("evaluation error: " + e.toString());
-        }
-    }
-    
-    private static Number division(Number o1, Number o2) throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "division");
-        
-        Number[] o = new Number[2];
-        o[0] = o1;
-        o[1] = o2;
-        
-//        int resolvedType = TypeResolver.resolveType(o);
-        if((o1!=null)&&(o2!=null))
-        {
-            if(o2.intValue()!=0)
-            {
-                //if (resolvedType == TypeConstants.doubleType)
-                //{
-                Double result=new Double(o1.doubleValue() / o2.doubleValue());
-                if(logger.isLoggable(Level.FINE))
-                    logger.fine(Thread.currentThread().getName()+" result "+result);
-                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "division");
-                
-                return result;
-                /* }
-                else if (resolvedType == TypeConstants.floatType)
-                {
-                    logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "division");
-                    
-                    Float result=new Float(o1.floatValue() / o2.floatValue());
-                    if(logger.isLoggable(Level.FINE))
-                        logger.fine(Thread.currentThread().getName()+" result "+result);
-                    
-                    return result;
-                }
-                else if (resolvedType == TypeConstants.longType)
-                {
-                    logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "division");
-                    
-                    Long result=new Long(o1.longValue() / o2.longValue());
-                    if(logger.isLoggable(Level.FINE))
-                        logger.fine(Thread.currentThread().getName()+" result "+result);
-                    
-                    return result;
-                }
-                else if (resolvedType == TypeConstants.intType)
-                {
-                    logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "division");
-                    
-                    Integer result=new Integer(o1.intValue() / o2.intValue());
-                    if(logger.isLoggable(Level.FINE))
-                        logger.fine(Thread.currentThread().getName()+" result "+result);
-                    
-                    return result;
-                }
-                else if (resolvedType == TypeConstants.shortType)
-                {
-                    logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "division");
-                    
-                    Short result=new Short((short) (o1.shortValue() / o2.shortValue()));
-                    if(logger.isLoggable(Level.FINE))
-                        logger.fine(Thread.currentThread().getName()+" result "+result);
-                    
-                    return result;
-                }
-                else if (resolvedType == TypeConstants.byteType)
-                {
-                    logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "division");
-                    
-                    Byte result=new Byte((byte) (o1.byteValue() / o2.byteValue()));
-                    if(logger.isLoggable(Level.FINE))
-                        logger.fine(Thread.currentThread().getName()+" result "+result);
-                    
-                    return result;
-                }
-                else
-                {
-                    logger.severe(Thread.currentThread().getName()+" "+"wrong operand type.");
-                    
-                    throw new SPLException("wrong operand type.");
-                }*/
-            }
-            else
-            {
-                logger.severe(Thread.currentThread().getName()+" "+"denominator is zero  LHS="+o1+" RHS="+o2);
-                
-                throw new SPLException("denominator is zero  LHS="+o1+" RHS="+o2);
-            }
-            
-        }
-        else
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"operand is null  LHS="+o1+" RHS="+o2);
-            
-            throw new SPLException("operand is null  LHS="+o1+" RHS="+o2);
-        }
-        
-    }
-    
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-        
-        TypeInfo lType = _lhsExp.getType();
-        TypeInfo rType = _rhsExp.getType();
-        
-        // dataType = TypeConstants.numericType;
-        if (TypeResolver.isNumeric(lType) && TypeResolver.isNumeric(rType) &&
-        		!lType.getIsArray() && !rType.getIsArray())
-        {
-            //dataType = TypeResolver
-            //        .binaryNumericPromotionResolver(lType, rType);
-            _dataType.setType(TypeConstants.doubleType);
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return true;
-        }
-        
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-        
-        return false;
-    }
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-
-        String str = this._lhsExp.toString() + " / " + this._rhsExp.toString();
-        	
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return str;
-    }
-    
-}
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Prashant Baliga <prabalig@in.ibm.com>
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.external.TypeConstants;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.DoubleArgumentExpression;
+import org.apache.imperius.spl.parser.expressions.NumericExpression;
+import org.apache.imperius.spl.parser.util.TypeInfo;
+import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.SPLLogger;
+
+
+/**
+ * 
+ * @author Xiping Change Log: 1. 3/9/07: Neeraj Joshi: Changed constructor to
+ *         take a list to facilitate reflection in the expression factory 2.
+ *         3/9/07: Neeraj Joshi: Changed the algorithm which determines return
+ *         type to use numeric promotion
+ * 
+ */
+public class Division extends DoubleArgumentExpression implements
+	NumericExpression
+{
+    
+    public static final String className = Division.class.getName();
+    
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="Division";
+    
+    
+    
+    public Division(List exprList, boolean validateExpression)
+    throws SPLException
+    {
+        super(exprList);
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Division");
+        
+        if (validateExpression)
+        {
+            if (!validate())
+            {
+                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
+                        + " has wrong data type passed in.");
+                
+                throw new SPLException("validation error: " + className
+                        + " has wrong data type passed in.");
+            }
+        }
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Division");
+        
+    }
+    
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+        
+        try
+        {
+            if(logger.isLoggable(Level.FINE))
+                logger.fine(Thread.currentThread().getName()+" LHS/RHS "+_lhsExp.toString()+"/"+_rhsExp.toString());
+            
+            Number lhs = (Number) _lhsExp.evaluate();
+            Number rhs = (Number) _rhsExp.evaluate();
+            
+            if(logger.isLoggable(Level.FINE))
+                logger.fine(Thread.currentThread().getName()+" LHS,RHS::"+lhs+","+rhs);
+            
+            Number result=division(lhs, rhs);
+            if(logger.isLoggable(Level.FINE))
+                logger.fine(Thread.currentThread().getName()+" division result ::"+lhs+"/"+rhs+"="+result);
+            
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+            
+            return result;
+        }
+        catch (Exception e)
+        {
+            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
+            
+            throw new SPLException("evaluation error: " + e.toString());
+        }
+    }
+    
+    private static Number division(Number o1, Number o2) throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "division");
+        
+        Number[] o = new Number[2];
+        o[0] = o1;
+        o[1] = o2;
+        
+//        int resolvedType = TypeResolver.resolveType(o);
+        if((o1!=null)&&(o2!=null))
+        {
+            if(o2.intValue()!=0)
+            {
+                //if (resolvedType == TypeConstants.doubleType)
+                //{
+                Double result=new Double(o1.doubleValue() / o2.doubleValue());
+                if(logger.isLoggable(Level.FINE))
+                    logger.fine(Thread.currentThread().getName()+" result "+result);
+                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "division");
+                
+                return result;
+                /* }
+                else if (resolvedType == TypeConstants.floatType)
+                {
+                    logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "division");
+                    
+                    Float result=new Float(o1.floatValue() / o2.floatValue());
+                    if(logger.isLoggable(Level.FINE))
+                        logger.fine(Thread.currentThread().getName()+" result "+result);
+                    
+                    return result;
+                }
+                else if (resolvedType == TypeConstants.longType)
+                {
+                    logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "division");
+                    
+                    Long result=new Long(o1.longValue() / o2.longValue());
+                    if(logger.isLoggable(Level.FINE))
+                        logger.fine(Thread.currentThread().getName()+" result "+result);
+                    
+                    return result;
+                }
+                else if (resolvedType == TypeConstants.intType)
+                {
+                    logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "division");
+                    
+                    Integer result=new Integer(o1.intValue() / o2.intValue());
+                    if(logger.isLoggable(Level.FINE))
+                        logger.fine(Thread.currentThread().getName()+" result "+result);
+                    
+                    return result;
+                }
+                else if (resolvedType == TypeConstants.shortType)
+                {
+                    logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "division");
+                    
+                    Short result=new Short((short) (o1.shortValue() / o2.shortValue()));
+                    if(logger.isLoggable(Level.FINE))
+                        logger.fine(Thread.currentThread().getName()+" result "+result);
+                    
+                    return result;
+                }
+                else if (resolvedType == TypeConstants.byteType)
+                {
+                    logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "division");
+                    
+                    Byte result=new Byte((byte) (o1.byteValue() / o2.byteValue()));
+                    if(logger.isLoggable(Level.FINE))
+                        logger.fine(Thread.currentThread().getName()+" result "+result);
+                    
+                    return result;
+                }
+                else
+                {
+                    logger.severe(Thread.currentThread().getName()+" "+"wrong operand type.");
+                    
+                    throw new SPLException("wrong operand type.");
+                }*/
+            }
+            else
+            {
+                logger.severe(Thread.currentThread().getName()+" "+"denominator is zero  LHS="+o1+" RHS="+o2);
+                
+                throw new SPLException("denominator is zero  LHS="+o1+" RHS="+o2);
+            }
+            
+        }
+        else
+        {
+            logger.severe(Thread.currentThread().getName()+" "+"operand is null  LHS="+o1+" RHS="+o2);
+            
+            throw new SPLException("operand is null  LHS="+o1+" RHS="+o2);
+        }
+        
+    }
+    
+    public boolean validate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+        
+        TypeInfo lType = _lhsExp.getType();
+        TypeInfo rType = _rhsExp.getType();
+        
+        // dataType = TypeConstants.numericType;
+        if (TypeResolver.isNumeric(lType) && TypeResolver.isNumeric(rType) &&
+        		!lType.getIsArray() && !rType.getIsArray())
+        {
+            //dataType = TypeResolver
+            //        .binaryNumericPromotionResolver(lType, rType);
+            _dataType.setType(TypeConstants.doubleType);
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return true;
+        }
+        
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+        
+        return false;
+    }
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+
+        String str = this._lhsExp.toString() + " / " + this._rhsExp.toString();
+        	
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return str;
+    }
+    
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Division.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/DoubleConstant.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/DoubleConstant.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/DoubleConstant.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/DoubleConstant.java Fri Jan 11 10:56:30 2008
@@ -1,95 +1,95 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Prashant Baliga <prabalig@in.ibm.com>
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.external.TypeConstants;
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.ConstantExpression;
-import org.apache.imperius.spl.parser.expressions.NumericExpression;
-import org.apache.imperius.spl.parser.util.TypeInfo;
-import org.apache.imperius.util.SPLLogger;
-
-
-public class DoubleConstant extends ConstantExpression implements
-        NumericExpression
-{
-    
-    private double doubleValue;
-    private TypeInfo _dataType=new TypeInfo();
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="DoubleConstant";
-    
-    
-    
-   
-    
-    public boolean isArray()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "isArray");
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "isArray");
-     
-        
-        return _dataType.getIsArray();
-    }
-    
-    public DoubleConstant(double val)
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "DoubleConstant");
-
-        this.doubleValue = val;
-        _dataType.setType(TypeConstants.doubleType);
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "DoubleConstant");
-        
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-     
-        return new Double(this.doubleValue);
-    }
-    
-    public TypeInfo getType()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "getType");
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "getType");
-     
-        return _dataType;
-    }
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-        
-        String str=Double.toString(this.doubleValue);
-        
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return str;
-    }
-    
-}
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Prashant Baliga <prabalig@in.ibm.com>
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.external.TypeConstants;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.ConstantExpression;
+import org.apache.imperius.spl.parser.expressions.NumericExpression;
+import org.apache.imperius.spl.parser.util.TypeInfo;
+import org.apache.imperius.util.SPLLogger;
+
+
+public class DoubleConstant extends ConstantExpression implements
+        NumericExpression
+{
+    
+    private double doubleValue;
+    private TypeInfo _dataType=new TypeInfo();
+    
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="DoubleConstant";
+    
+    
+    
+   
+    
+    public boolean isArray()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "isArray");
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "isArray");
+     
+        
+        return _dataType.getIsArray();
+    }
+    
+    public DoubleConstant(double val)
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "DoubleConstant");
+
+        this.doubleValue = val;
+        _dataType.setType(TypeConstants.doubleType);
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "DoubleConstant");
+        
+    }
+    
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+     
+        return new Double(this.doubleValue);
+    }
+    
+    public TypeInfo getType()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "getType");
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "getType");
+     
+        return _dataType;
+    }
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+        
+        String str=Double.toString(this.doubleValue);
+        
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return str;
+    }
+    
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/DoubleConstant.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EndsWith.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EndsWith.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EndsWith.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EndsWith.java Fri Jan 11 10:56:30 2008
@@ -1,120 +1,120 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Prashant Baliga <prabalig@in.ibm.com>
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.List;
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.external.TypeConstants;
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.BooleanExpression;
-import org.apache.imperius.spl.parser.expressions.DoubleArgumentExpression;
-import org.apache.imperius.spl.parser.util.TypeInfo;
-import org.apache.imperius.spl.parser.util.TypeResolver;
-import org.apache.imperius.util.SPLLogger;
-
-
-
-public class EndsWith extends DoubleArgumentExpression implements
-        BooleanExpression
-{
-    
-    public static final String className = EndsWith.class.getName();
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="EndsWith";
-    
-    
-    
-    public EndsWith(List exprList, boolean validateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "EndsWith");
-
-        if (validateExpression)
-        {
-            if (!validate())
-            {
-                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
-                        + " has wrong data type passed in.");
-                
-                throw new SPLException("validation error: " + className
-                        + " has wrong data type passed in.");
-            }
-        }
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "EndsWith");
-        
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-        try
-        {
-            String s0 = (String) _lhsExp.evaluate();
-            String s1 = (String) _rhsExp.evaluate();
-
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-         
-            return new Boolean(s0.endsWith(s1));
-        }
-        catch (Exception e)
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
-            
-            throw new SPLException("evaluation error: " + e.toString());
-        }
-    }
-    
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-        TypeInfo lType = _lhsExp.getType();
-        TypeInfo rType = _rhsExp.getType();
-        
-        if (TypeResolver.isString(lType) && TypeResolver.isString(rType) &&
-        		!lType.getIsArray() && !rType.getIsArray())
-        {
-            _dataType.setType(TypeConstants.booleanType);
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return true;
-        }
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-     
-        return false;
-    }
-    
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-
-        String str = this._lhsExp.toString() + ".endsWith(" + this._rhsExp.toString() + ")";
-        	
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return str;
-    }
-}
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Prashant Baliga <prabalig@in.ibm.com>
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.external.TypeConstants;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.BooleanExpression;
+import org.apache.imperius.spl.parser.expressions.DoubleArgumentExpression;
+import org.apache.imperius.spl.parser.util.TypeInfo;
+import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.SPLLogger;
+
+
+
+public class EndsWith extends DoubleArgumentExpression implements
+        BooleanExpression
+{
+    
+    public static final String className = EndsWith.class.getName();
+    
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="EndsWith";
+    
+    
+    
+    public EndsWith(List exprList, boolean validateExpression)
+            throws SPLException
+    {
+        super(exprList);
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "EndsWith");
+
+        if (validateExpression)
+        {
+            if (!validate())
+            {
+                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
+                        + " has wrong data type passed in.");
+                
+                throw new SPLException("validation error: " + className
+                        + " has wrong data type passed in.");
+            }
+        }
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "EndsWith");
+        
+    }
+    
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+
+        try
+        {
+            String s0 = (String) _lhsExp.evaluate();
+            String s1 = (String) _rhsExp.evaluate();
+
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+         
+            return new Boolean(s0.endsWith(s1));
+        }
+        catch (Exception e)
+        {
+            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
+            
+            throw new SPLException("evaluation error: " + e.toString());
+        }
+    }
+    
+    public boolean validate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+
+        TypeInfo lType = _lhsExp.getType();
+        TypeInfo rType = _rhsExp.getType();
+        
+        if (TypeResolver.isString(lType) && TypeResolver.isString(rType) &&
+        		!lType.getIsArray() && !rType.getIsArray())
+        {
+            _dataType.setType(TypeConstants.booleanType);
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return true;
+        }
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+     
+        return false;
+    }
+    
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+
+        String str = this._lhsExp.toString() + ".endsWith(" + this._rhsExp.toString() + ")";
+        	
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return str;
+    }
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EndsWith.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EqCollections.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EqCollections.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EqCollections.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EqCollections.java Fri Jan 11 10:56:30 2008
@@ -1,215 +1,215 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Prashant Baliga <prabalig@in.ibm.com>
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.external.Expression;
-import org.apache.imperius.spl.external.TypeConstants;
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.DoubleArgumentExpression;
-import org.apache.imperius.util.SPLLogger;
-
-
-public class EqCollections extends DoubleArgumentExpression implements
-        Expression
-{
-    
-    // private BasicCollectionExpression basicCollection=null;
-    public String className = EqCollections.class.toString();
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="EqCollections";
-    
-    
-    
-    public EqCollections(List exprList, boolean evaluateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "EqCollections");
-
-       //System.out.println("EqCollections");
-        // this.basicCollection=new BasicCollectionExpression(exprList,new
-        // SPLSymbolTable());
-        
-        if (evaluateExpression)
-        {
-           //System.out.println("evaluateExpression " + evaluateExpression);
-            if (!validate())
-            {
-                logger.severe(Thread.currentThread().getName()+" "+"validation error: wrong data type passed in");
-                throw new SPLException(
-                        "validation error: wrong data type passed in "
-                                + this._dataType);
-            }
-            
-        }
-        this._dataType.setType(TypeConstants.booleanType);
-        _dataType.setIsArray(false);
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "EqCollections");
-        
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-        //System.out.println("EqCollections:evaluate");
-        Object lhsResult = this._lhsExp.evaluate();
-        Object rhsResult = this._rhsExp.evaluate();
-        if (!(lhsResult instanceof java.util.List))
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"lhsResult is not of type List");
-            throw new SPLException("lhsResult is not of type List");
-        }
-        else
-        {
-            //System.out.println("lhsResult is of type List");
-        }
-        if (!(rhsResult instanceof java.util.List))
-        {
-
-            logger.severe(Thread.currentThread().getName()+" "+"rhsResult is not of type List");
-            throw new SPLException("rhsResult is not of type List");
-        }
-        else
-        {
-            //System.out.println("rhsResult is of type List");
-        }
-        
-        List lhsResultarray = (List) lhsResult;
-        List rhsResultarray = (List) rhsResult;
-        Boolean result = Boolean.FALSE;
-        if (lhsResultarray.size() != rhsResultarray.size())
-        {
-            result = Boolean.FALSE;
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-            
-            return result;
-        }
-        Iterator lhsResultarrayIt = lhsResultarray.iterator();
-        while (lhsResultarrayIt.hasNext())
-        {
-            Object lhsResultarrayElement = lhsResultarrayIt.next();
-            //System.out.println("element from Lhs ResultArray "+ lhsResultarrayElement + "  "+ lhsResultarrayElement.getClass());
-            if (!(rhsResultarray.contains(lhsResultarrayElement)))
-            {
-                //System.out.println("element does not exists in RHS List");
-                result = Boolean.FALSE;
-                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-                
-                return result;
-            }
-            else
-            {
-                //System.out.println("element exists in RHS List");
-            }
-            
-        }
-        Iterator rhsResultarrayIt = rhsResultarray.iterator();
-        while (rhsResultarrayIt.hasNext())
-        {
-            Object rhsResultarrayElement = rhsResultarrayIt.next();
-            //System.out.println("element from Lhs ResultArray "+ rhsResultarrayElement + "  "+ rhsResultarrayElement.getClass());
-            if (!(lhsResultarray.contains(rhsResultarrayElement)))
-            {
-                //System.out.println("element does not exists in LHS List");
-                result = Boolean.FALSE;
-                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-                
-                return result;
-            }
-            else
-            {
-                //System.out.println("element exists in RHS List");
-            }
-            
-        }
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-        
-        return Boolean.TRUE;
-        
-    }
-    
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-        //System.out.println("EqCollections : validate ");
-        Expression lhsExpression = (Expression) this._lhsExp;
-        Expression rhsExpression = (Expression) this._rhsExp;
-        if ((lhsExpression == null) || (rhsExpression == null))
-        {
-            //System.out.println("EqCollections : One or more expressions are null ");
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return false;
-        }
-        if (lhsExpression.getType().getType() != rhsExpression.getType().getType() )
-        {
-            //System.out.println("EqCollections : lhs Type !=rhs Type "+ lhsExpression.getType() + ":" + rhsExpression.getType());
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return false;
-        }
-        if (lhsExpression.isArray())
-        {
-            //System.out.println("lhsExpression.getType() ==TypeConstants.basicCollectionType");
-            if (rhsExpression.isArray())
-            {
-                //System.out.println("rhsExpression.getType() ==TypeConstants.basicCollectionType");
-                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-                
-                return true;
-                
-            }
-            else
-            {
-                //System.out.println("rhsExpression.getType() !=TypeConstants.basicCollectionType");
-                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-                
-                return false;
-            }
-        }
-        else
-        {
-            //System.out.println("lhsExpression.getType() !=TypeConstants.basicCollectionType");
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return false;
-        }
-        
-    }
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-
-        String str = "EqCollections( "+ this._lhsExp.toString() + "," + this._rhsExp.toString() +")";
-        	
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return str;
-    }
-    
-}
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Prashant Baliga <prabalig@in.ibm.com>
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.external.Expression;
+import org.apache.imperius.spl.external.TypeConstants;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.DoubleArgumentExpression;
+import org.apache.imperius.util.SPLLogger;
+
+
+public class EqCollections extends DoubleArgumentExpression implements
+        Expression
+{
+    
+    // private BasicCollectionExpression basicCollection=null;
+    public String className = EqCollections.class.toString();
+    
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="EqCollections";
+    
+    
+    
+    public EqCollections(List exprList, boolean evaluateExpression)
+            throws SPLException
+    {
+        super(exprList);
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "EqCollections");
+
+       //System.out.println("EqCollections");
+        // this.basicCollection=new BasicCollectionExpression(exprList,new
+        // SPLSymbolTable());
+        
+        if (evaluateExpression)
+        {
+           //System.out.println("evaluateExpression " + evaluateExpression);
+            if (!validate())
+            {
+                logger.severe(Thread.currentThread().getName()+" "+"validation error: wrong data type passed in");
+                throw new SPLException(
+                        "validation error: wrong data type passed in "
+                                + this._dataType);
+            }
+            
+        }
+        this._dataType.setType(TypeConstants.booleanType);
+        _dataType.setIsArray(false);
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "EqCollections");
+        
+    }
+    
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+
+        //System.out.println("EqCollections:evaluate");
+        Object lhsResult = this._lhsExp.evaluate();
+        Object rhsResult = this._rhsExp.evaluate();
+        if (!(lhsResult instanceof java.util.List))
+        {
+            logger.severe(Thread.currentThread().getName()+" "+"lhsResult is not of type List");
+            throw new SPLException("lhsResult is not of type List");
+        }
+        else
+        {
+            //System.out.println("lhsResult is of type List");
+        }
+        if (!(rhsResult instanceof java.util.List))
+        {
+
+            logger.severe(Thread.currentThread().getName()+" "+"rhsResult is not of type List");
+            throw new SPLException("rhsResult is not of type List");
+        }
+        else
+        {
+            //System.out.println("rhsResult is of type List");
+        }
+        
+        List lhsResultarray = (List) lhsResult;
+        List rhsResultarray = (List) rhsResult;
+        Boolean result = Boolean.FALSE;
+        if (lhsResultarray.size() != rhsResultarray.size())
+        {
+            result = Boolean.FALSE;
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+            
+            return result;
+        }
+        Iterator lhsResultarrayIt = lhsResultarray.iterator();
+        while (lhsResultarrayIt.hasNext())
+        {
+            Object lhsResultarrayElement = lhsResultarrayIt.next();
+            //System.out.println("element from Lhs ResultArray "+ lhsResultarrayElement + "  "+ lhsResultarrayElement.getClass());
+            if (!(rhsResultarray.contains(lhsResultarrayElement)))
+            {
+                //System.out.println("element does not exists in RHS List");
+                result = Boolean.FALSE;
+                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+                
+                return result;
+            }
+            else
+            {
+                //System.out.println("element exists in RHS List");
+            }
+            
+        }
+        Iterator rhsResultarrayIt = rhsResultarray.iterator();
+        while (rhsResultarrayIt.hasNext())
+        {
+            Object rhsResultarrayElement = rhsResultarrayIt.next();
+            //System.out.println("element from Lhs ResultArray "+ rhsResultarrayElement + "  "+ rhsResultarrayElement.getClass());
+            if (!(lhsResultarray.contains(rhsResultarrayElement)))
+            {
+                //System.out.println("element does not exists in LHS List");
+                result = Boolean.FALSE;
+                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+                
+                return result;
+            }
+            else
+            {
+                //System.out.println("element exists in RHS List");
+            }
+            
+        }
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+        
+        return Boolean.TRUE;
+        
+    }
+    
+    public boolean validate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+
+        //System.out.println("EqCollections : validate ");
+        Expression lhsExpression = (Expression) this._lhsExp;
+        Expression rhsExpression = (Expression) this._rhsExp;
+        if ((lhsExpression == null) || (rhsExpression == null))
+        {
+            //System.out.println("EqCollections : One or more expressions are null ");
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return false;
+        }
+        if (lhsExpression.getType().getType() != rhsExpression.getType().getType() )
+        {
+            //System.out.println("EqCollections : lhs Type !=rhs Type "+ lhsExpression.getType() + ":" + rhsExpression.getType());
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return false;
+        }
+        if (lhsExpression.isArray())
+        {
+            //System.out.println("lhsExpression.getType() ==TypeConstants.basicCollectionType");
+            if (rhsExpression.isArray())
+            {
+                //System.out.println("rhsExpression.getType() ==TypeConstants.basicCollectionType");
+                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+                
+                return true;
+                
+            }
+            else
+            {
+                //System.out.println("rhsExpression.getType() !=TypeConstants.basicCollectionType");
+                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+                
+                return false;
+            }
+        }
+        else
+        {
+            //System.out.println("lhsExpression.getType() !=TypeConstants.basicCollectionType");
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return false;
+        }
+        
+    }
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+
+        String str = "EqCollections( "+ this._lhsExp.toString() + "," + this._rhsExp.toString() +")";
+        	
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return str;
+    }
+    
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/EqCollections.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Equal.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Equal.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Equal.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Equal.java Fri Jan 11 10:56:30 2008
@@ -1,151 +1,151 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Prashant Baliga <prabalig@in.ibm.com>
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.List;
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.external.TypeConstants;
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.BooleanExpression;
-import org.apache.imperius.spl.parser.expressions.DoubleArgumentExpression;
-import org.apache.imperius.spl.parser.util.ExpressionUtility;
-import org.apache.imperius.spl.parser.util.TypeInfo;
-import org.apache.imperius.spl.parser.util.TypeResolver;
-import org.apache.imperius.util.SPLLogger;
-
-
-
-public class Equal extends DoubleArgumentExpression implements
-        BooleanExpression
-{
-    
-    public static final String className = Equal.class.getName();
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="Equal";
-    
-    
-    
-    public Equal(List exprList, boolean validateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Equal");
-
-       //System.out.println("Equal: super(exprList) done");
-        if (validateExpression)
-        {
-           //System.out.println("Equal::validate()  lhsExpType:RhsExpType=result    "
-           //                 + lhsExp.getType()
-           //                 + ":"
-           //                 + rhsExp.getType()
-           //                 + "="
-           //                 + validate());
-            if (!validate())
-            {
-                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
-                        + " has wrong data type passed in.");
-                throw new SPLException("validation error: " + className
-                        + " has wrong data type passed in.");
-            }
-        }
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Equal");
-        
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-        try
-        {
-        	//System.out.println("_lhsExp "+_lhsExp );
-        	//System.out.println("_rhsExp "+_rhsExp);
-        	
-            Object lhsValue = _lhsExp.evaluate();
-            Object rhsValue = _rhsExp.evaluate();
-            //System.out.println("_lhsExp "+lhsValue+" "+_lhsExp.getClass());
-        	//System.out.println("_rhsExp "+rhsValue+" "+_rhsExp.getClass());
-        	
-            if (ExpressionUtility.compare(lhsValue, rhsValue) == 0)
-            {
-                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-                
-                return Boolean.TRUE;
-            }
-            else
-            {
-                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-                
-                return Boolean.FALSE;
-            }
-        }
-        catch (Exception e)
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
-            
-            throw new SPLException("evaluation error: " + e.toString());
-        }
-    }
-    
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-        TypeInfo lType = _lhsExp.getType();
-        TypeInfo rType = _rhsExp.getType();
-        
-        //System.out.println("Equal::validate() lhsExpType:RhsExpType
-        // "+lType+":"+rType);
-        if (!lType.getIsArray() && !rType.getIsArray() &&
-        		TypeResolver.isTypeAssignableForEquality(lType, rType))
-        {
-            _dataType.setType(TypeConstants.booleanType);
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return true;
-        }
-        if ((TypeResolver.isCalendar(lType))
-                && (TypeResolver.isCalendar(rType)))
-        {
-            _dataType.setType(TypeConstants.booleanType);
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return true;
-        }
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-     
-        return false;
-    }
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-
-        String str = this._lhsExp.toString() + "==" + this._rhsExp.toString();
-        	
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return str;
-    }
-    
-}
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Prashant Baliga <prabalig@in.ibm.com>
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.external.TypeConstants;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.BooleanExpression;
+import org.apache.imperius.spl.parser.expressions.DoubleArgumentExpression;
+import org.apache.imperius.spl.parser.util.ExpressionUtility;
+import org.apache.imperius.spl.parser.util.TypeInfo;
+import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.SPLLogger;
+
+
+
+public class Equal extends DoubleArgumentExpression implements
+        BooleanExpression
+{
+    
+    public static final String className = Equal.class.getName();
+    
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="Equal";
+    
+    
+    
+    public Equal(List exprList, boolean validateExpression)
+            throws SPLException
+    {
+        super(exprList);
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Equal");
+
+       //System.out.println("Equal: super(exprList) done");
+        if (validateExpression)
+        {
+           //System.out.println("Equal::validate()  lhsExpType:RhsExpType=result    "
+           //                 + lhsExp.getType()
+           //                 + ":"
+           //                 + rhsExp.getType()
+           //                 + "="
+           //                 + validate());
+            if (!validate())
+            {
+                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
+                        + " has wrong data type passed in.");
+                throw new SPLException("validation error: " + className
+                        + " has wrong data type passed in.");
+            }
+        }
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Equal");
+        
+    }
+    
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+
+        try
+        {
+        	//System.out.println("_lhsExp "+_lhsExp );
+        	//System.out.println("_rhsExp "+_rhsExp);
+        	
+            Object lhsValue = _lhsExp.evaluate();
+            Object rhsValue = _rhsExp.evaluate();
+            //System.out.println("_lhsExp "+lhsValue+" "+_lhsExp.getClass());
+        	//System.out.println("_rhsExp "+rhsValue+" "+_rhsExp.getClass());
+        	
+            if (ExpressionUtility.compare(lhsValue, rhsValue) == 0)
+            {
+                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+                
+                return Boolean.TRUE;
+            }
+            else
+            {
+                logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+                
+                return Boolean.FALSE;
+            }
+        }
+        catch (Exception e)
+        {
+            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
+            
+            throw new SPLException("evaluation error: " + e.toString());
+        }
+    }
+    
+    public boolean validate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+
+        TypeInfo lType = _lhsExp.getType();
+        TypeInfo rType = _rhsExp.getType();
+        
+        //System.out.println("Equal::validate() lhsExpType:RhsExpType
+        // "+lType+":"+rType);
+        if (!lType.getIsArray() && !rType.getIsArray() &&
+        		TypeResolver.isTypeAssignableForEquality(lType, rType))
+        {
+            _dataType.setType(TypeConstants.booleanType);
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return true;
+        }
+        if ((TypeResolver.isCalendar(lType))
+                && (TypeResolver.isCalendar(rType)))
+        {
+            _dataType.setType(TypeConstants.booleanType);
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return true;
+        }
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+     
+        return false;
+    }
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+
+        String str = this._lhsExp.toString() + "==" + this._rhsExp.toString();
+        	
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return str;
+    }
+    
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Equal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Exp.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Exp.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Exp.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Exp.java Fri Jan 11 10:56:30 2008
@@ -1,125 +1,125 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Prashant Baliga <prabalig@in.ibm.com>
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.List;
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.external.TypeConstants;
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.NumericExpression;
-import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
-import org.apache.imperius.spl.parser.util.TypeInfo;
-import org.apache.imperius.spl.parser.util.TypeResolver;
-import org.apache.imperius.util.SPLLogger;
-
-
-
-public class Exp extends SingleArgumentExpression implements NumericExpression
-{
-    
-    public static final String className = Exp.class.getName();
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="Exp";
-    
-    
-    
-    public Exp(List exprList, boolean validateExpression)
-            throws SPLException
-    {
-        super(exprList);
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Exp");
-
-        if (validateExpression)
-        {
-            if (!validate())
-            {
-                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
-                        + " has wrong data type passed in.");
-                
-                throw new SPLException("validation error: " + className
-                        + " has wrong data type passed in.");
-            }
-        }
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Exp");
-        
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-        try
-        {
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-            
-            return exp((Number) _exp.evaluate());
-        }
-        catch (Exception e)
-        {
-            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
-        
-            
-            throw new SPLException("evaluation error: " + e.toString());
-        }
-    }
-    
-    public static Number exp(Number o)
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "exp");
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "exp");
-     
-        return new Double(Math.exp(o.doubleValue()));
-    }
-    
-    public boolean validate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-
-        TypeInfo eType = _exp.getType();
-        
-        // dataType = TypeConstants.numericType;
-        if (TypeResolver.isNumeric(eType))
-        {
-            _dataType.setType(TypeConstants.doubleType);
-            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-            
-            return true;
-        }
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
-     
-        return false;
-    }
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-
-        String str = "Exp( "+ this._exp.toString() + ")";
-        	
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return str;
-    }
-    
-}
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Prashant Baliga <prabalig@in.ibm.com>
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.external.TypeConstants;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.NumericExpression;
+import org.apache.imperius.spl.parser.expressions.SingleArgumentExpression;
+import org.apache.imperius.spl.parser.util.TypeInfo;
+import org.apache.imperius.spl.parser.util.TypeResolver;
+import org.apache.imperius.util.SPLLogger;
+
+
+
+public class Exp extends SingleArgumentExpression implements NumericExpression
+{
+    
+    public static final String className = Exp.class.getName();
+    
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="Exp";
+    
+    
+    
+    public Exp(List exprList, boolean validateExpression)
+            throws SPLException
+    {
+        super(exprList);
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "Exp");
+
+        if (validateExpression)
+        {
+            if (!validate())
+            {
+                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
+                        + " has wrong data type passed in.");
+                
+                throw new SPLException("validation error: " + className
+                        + " has wrong data type passed in.");
+            }
+        }
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Exp");
+        
+    }
+    
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+
+        try
+        {
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+            
+            return exp((Number) _exp.evaluate());
+        }
+        catch (Exception e)
+        {
+            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
+        
+            
+            throw new SPLException("evaluation error: " + e.toString());
+        }
+    }
+    
+    public static Number exp(Number o)
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "exp");
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "exp");
+     
+        return new Double(Math.exp(o.doubleValue()));
+    }
+    
+    public boolean validate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+
+        TypeInfo eType = _exp.getType();
+        
+        // dataType = TypeConstants.numericType;
+        if (TypeResolver.isNumeric(eType))
+        {
+            _dataType.setType(TypeConstants.doubleType);
+            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+            
+            return true;
+        }
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "validate");
+     
+        return false;
+    }
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+
+        String str = "Exp( "+ this._exp.toString() + ")";
+        	
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return str;
+    }
+    
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/Exp.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/FloatConstant.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/FloatConstant.java?rev=611261&r1=611260&r2=611261&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/FloatConstant.java (original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/FloatConstant.java Fri Jan 11 10:56:30 2008
@@ -1,93 +1,93 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-//
-
-/**
- * @author Neeraj Joshi
- *
- */
-package org.apache.imperius.spl.parser.expressions.impl;
-
-import java.util.logging.Logger;
-
-import org.apache.imperius.spl.external.TypeConstants;
-import org.apache.imperius.spl.parser.exceptions.SPLException;
-import org.apache.imperius.spl.parser.expressions.ConstantExpression;
-import org.apache.imperius.spl.parser.expressions.NumericExpression;
-import org.apache.imperius.spl.parser.util.TypeInfo;
-import org.apache.imperius.util.SPLLogger;
-
-
-public class FloatConstant extends ConstantExpression implements
-        NumericExpression
-{
-    
-    private float floatValue;
-    
-    public TypeInfo _dataType = new TypeInfo(TypeConstants.floatType);;
-    
-    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
-    private static final String sourceClass="FloatConstant";
-    
-    
-    
-    public boolean isArray()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "isArray");
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "isArray");
-     
-        
-        return _dataType.getIsArray();
-    }
-    
-    public FloatConstant(float val)
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "FloatConstant");
-       
-        this.floatValue = val;
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "FloatConstant");
-        
-    }
-    
-    public Object evaluate() throws SPLException
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
-     
-        return new Float(this.floatValue);
-    }
-    
-    public TypeInfo getType()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "getType");
-
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "getType");
-     
-        return _dataType;
-    }
-    
-    public String toString()
-    {
-        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-        
-        String str=Float.toString(this.floatValue);
-        
-        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
-       
-        return str;
-    }
-    
-}
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+
+/**
+ * @author Neeraj Joshi
+ *
+ */
+package org.apache.imperius.spl.parser.expressions.impl;
+
+import java.util.logging.Logger;
+
+import org.apache.imperius.spl.external.TypeConstants;
+import org.apache.imperius.spl.parser.exceptions.SPLException;
+import org.apache.imperius.spl.parser.expressions.ConstantExpression;
+import org.apache.imperius.spl.parser.expressions.NumericExpression;
+import org.apache.imperius.spl.parser.util.TypeInfo;
+import org.apache.imperius.util.SPLLogger;
+
+
+public class FloatConstant extends ConstantExpression implements
+        NumericExpression
+{
+    
+    private float floatValue;
+    
+    public TypeInfo _dataType = new TypeInfo(TypeConstants.floatType);;
+    
+    private static Logger logger = SPLLogger.getSPLLogger().getLogger();
+    private static final String sourceClass="FloatConstant";
+    
+    
+    
+    public boolean isArray()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "isArray");
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "isArray");
+     
+        
+        return _dataType.getIsArray();
+    }
+    
+    public FloatConstant(float val)
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "FloatConstant");
+       
+        this.floatValue = val;
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "FloatConstant");
+        
+    }
+    
+    public Object evaluate() throws SPLException
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
+     
+        return new Float(this.floatValue);
+    }
+    
+    public TypeInfo getType()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "getType");
+
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "getType");
+     
+        return _dataType;
+    }
+    
+    public String toString()
+    {
+        logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+        
+        String str=Float.toString(this.floatValue);
+        
+        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "toString");
+       
+        return str;
+    }
+    
+}

Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/expressions/impl/FloatConstant.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message