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
021import java.util.Date;
022
023import lucee.runtime.exp.PageException;
024import lucee.runtime.util.Operation;
025
026/**
027 * oimplementation of interface Operation
028 */
029public final class OperationImpl implements Operation {
030
031    private static OperationImpl singelton;
032
033    @Override
034    public int compare(boolean left, boolean right) {
035        return Operator.compare(left,right);
036    }
037
038    @Override
039    public int compare(boolean left, Date right) {
040        return Operator.compare(left,right);
041    }
042
043    @Override
044    public int compare(boolean left, double right) {
045        return Operator.compare(left,right);
046    }
047
048    @Override
049    public int compare(boolean left, Object right) throws PageException {
050        return Operator.compare(left,right);
051    }
052
053    @Override
054    public int compare(boolean left, String right) {
055        return Operator.compare(left,right);
056    }
057
058    @Override
059    public int compare(Date left, boolean right) {
060        return Operator.compare(left,right);
061    }
062
063    @Override
064    public int compare(Date left, Date right) {
065        return Operator.compare(left,right);
066    }
067
068    @Override
069    public int compare(Date left, double right) {
070        return Operator.compare(left,right);
071    }
072
073    @Override
074    public int compare(Date left, Object right) throws PageException {
075        return Operator.compare(left,right);
076    }
077
078    @Override
079    public int compare(Date left, String right) throws PageException {
080        return Operator.compare(left,right);
081    }
082
083    @Override
084    public int compare(double left, boolean right) {
085        return Operator.compare(left,right);
086    }
087
088    @Override
089    public int compare(double left, Date right) {
090        return Operator.compare(left,right);
091    }
092
093    @Override
094    public int compare(double left, double right) {
095        return Operator.compare(left,right);
096    }
097
098    @Override
099    public int compare(double left, Object right) throws PageException {
100        return Operator.compare(left,right);
101    }
102
103    @Override
104    public int compare(double left, String right) {
105        return Operator.compare(left,right);
106    }
107
108    @Override
109    public int compare(Object left, boolean right) throws PageException {
110        return Operator.compare(left,right);
111    }
112
113    @Override
114    public int compare(Object left, Date right) throws PageException {
115        return Operator.compare(left,right);
116    }
117
118    @Override
119    public int compare(Object left, double right) throws PageException {
120        return Operator.compare(left,right);
121    }
122
123    @Override
124    public int compare(Object left, Object right) throws PageException {
125        return Operator.compare(left,right);
126    }
127
128    @Override
129    public int compare(Object left, String right) throws PageException {
130        return Operator.compare(left,right);
131    }
132
133    @Override
134    public int compare(String left, boolean right) {
135        return Operator.compare(left,right);
136    }
137
138    @Override
139    public int compare(String left, Date right) throws PageException {
140        return Operator.compare(left,right);
141    }
142
143    @Override
144    public int compare(String left, double right) {
145        return Operator.compare(left,right);
146    }
147
148    @Override
149    public int compare(String left, Object right) throws PageException {
150        return Operator.compare(left,right);
151    }
152
153    @Override
154    public int compare(String left, String right) {
155        return Operator.compare(left,right);
156    }
157
158    @Override
159    public String concat(String left, String right) {
160        return left.concat(right);
161    }
162
163    @Override
164    public boolean ct(Object left, Object right) throws PageException {
165        return Operator.ct(left,right);
166    }
167
168    @Override
169    public double divide(double left, double right) {
170        return Operator.divide(left,right);
171    }
172
173    @Override
174    public boolean equals(Object left, Object right, boolean caseSensitive) throws PageException {
175        return Operator.equals(left,right,caseSensitive);
176    }
177
178    @Override
179    public boolean eqv(Object left, Object right) throws PageException {
180        return Operator.eqv(left,right);
181    }
182
183    @Override
184    public double exponent(Object left, Object right) throws PageException {
185        return Operator.exponent(left,right);
186    }
187
188    @Override
189    public boolean imp(Object left, Object right) throws PageException {
190        return Operator.imp(left,right);
191    }
192
193    @Override
194    public double minus(double left, double right) {
195        return Operator.minus(left,right);
196    }
197
198    @Override
199    public double modulus(double left, double right) {
200        return Operator.modulus(left,right);
201    }
202
203    @Override
204    public double multiply(double left, double right) {
205        return Operator.multiply(left,right);
206    }
207
208    @Override
209    public boolean nct(Object left, Object right) throws PageException {
210        return Operator.nct(left,right);
211    }
212
213    @Override
214    public double plus(double left, double right) {
215        return Operator.plus(left,right);
216    }
217
218    public static Operation getInstance() {
219        if(singelton==null)singelton=new OperationImpl();
220        return singelton;
221    }
222
223}