001/**
002 *
003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved.
004 *
005 * This library is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU Lesser General Public
007 * License as published by the Free Software Foundation; either 
008 * version 2.1 of the License, or (at your option) any later version.
009 * 
010 * This library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013 * Lesser General Public License for more details.
014 * 
015 * You should have received a copy of the GNU Lesser General Public 
016 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
017 * 
018 **/
019package lucee.runtime.op;
020
021
022/**
023 * Constant Values
024 */
025public final class Constants {
026        
027        public static final Object[] EMPTY_OBJECT_ARRAY=new Object[0];
028        
029        
030        /**
031         * Field <code>INTEGER_ZERO</code> equals Integer.valueOf(0)
032         */
033        public static final Integer INTEGER_0=Integer.valueOf(0);
034        /**
035         * Field <code>INTEGER_ONE</code> equals Integer.valueOf(1)
036         */
037        public static final Integer INTEGER_1=Integer.valueOf(1);
038        
039        public static final Integer INTEGER_MINUS_ONE=Integer.valueOf(-1);
040        /**
041         * Field <code>INTEGER_TWO</code> equals Integer.valueOf(8)
042         */
043        public static final Integer INTEGER_2=Integer.valueOf(2);
044        /**
045         * Field <code>INTEGER_THREE</code> equals Integer.valueOf(3)
046         */
047        public static final Integer INTEGER_3=Integer.valueOf(3);
048        /**
049         * Field <code>INTEGER_FOUR</code> equals Integer.valueOf(4)
050         */
051        public static final Integer INTEGER_4=Integer.valueOf(4);
052        /**
053         * Field <code>INTEGER_FIVE</code> equals Integer.valueOf(5)
054         */
055        public static final Integer INTEGER_5=Integer.valueOf(5);
056        /**
057         * Field <code>INTEGER_SIX</code> equals Integer.valueOf(6)
058         */
059        public static final Integer INTEGER_6=Integer.valueOf(6);
060        /**
061         * Field <code>INTEGER_SEVEN</code> equals Integer.valueOf(7)
062         */
063        public static final Integer INTEGER_7=Integer.valueOf(7);
064        /**
065         * Field <code>INTEGER_EIGHT</code> equals Integer.valueOf(8)
066         */
067        public static final Integer INTEGER_8=Integer.valueOf(8);
068        /**
069         * Field <code>INTEGER_NINE</code> equals Integer.valueOf(9)
070         */
071        public static final Integer INTEGER_9=Integer.valueOf(9);
072        /**
073         * Field <code>INTEGER_NINE</code> equals Integer.valueOf(9)
074         */
075        public static final Integer INTEGER_10=Integer.valueOf(10);
076        public static final Integer INTEGER_11=Integer.valueOf(11);
077        public static final Integer INTEGER_12=Integer.valueOf(12);
078        
079
080        public static final short SHORT_VALUE_ZERO = (short)0;
081        public static final Short SHORT_ZERO = Short.valueOf((short)0);
082        public static final Long LONG_ZERO = Long.valueOf(0);
083        public static final Double DOUBLE_ZERO = new Double(0);
084    
085    
086        
087    /**
088     * return a Integer object with same value
089     * @param i
090     * @return Integer Object
091     * @deprecated use Integer.valueOf() instead
092     */
093    public static Integer Integer(int i) {
094        //if(i>-1 && i<100) return INTEGER[i];
095        return Integer.valueOf(i);
096    }
097
098    /**
099     * return a Boolean object with same value
100     * @param b
101     * @return Boolean Object
102     * @deprecated use Boolean.valueOf() instead
103     */
104    public static Boolean Boolean(boolean b) {
105        return b?Boolean.TRUE:Boolean.FALSE;
106    }
107    
108}