MCPcopy Create free account
hub / github.com/beanshell/beanshell / binaryOperationImpl

Method binaryOperationImpl

src/bsh/Primitive.java:266–281  ·  view source on GitHub ↗
( Object lhs, Object rhs, int kind )

Source from the content-addressed store, hash-verified

264 }
265
266 static Object binaryOperationImpl( Object lhs, Object rhs, int kind )
267 throws UtilEvalError
268 {
269 if(lhs instanceof Boolean)
270 return booleanBinaryOperation((Boolean)lhs, (Boolean)rhs, kind);
271 else if(lhs instanceof Integer)
272 return intBinaryOperation( (Integer)lhs, (Integer)rhs, kind );
273 else if(lhs instanceof Long)
274 return longBinaryOperation((Long)lhs, (Long)rhs, kind);
275 else if(lhs instanceof Float)
276 return floatBinaryOperation((Float)lhs, (Float)rhs, kind);
277 else if(lhs instanceof Double)
278 return doubleBinaryOperation( (Double)lhs, (Double)rhs, kind);
279 else
280 throw new UtilEvalError("Invalid types in binary operator" );
281 }
282
283 static Boolean booleanBinaryOperation(Boolean B1, Boolean B2, int kind)
284 {

Callers 1

binaryOperationMethod · 0.95

Calls 5

intBinaryOperationMethod · 0.95
longBinaryOperationMethod · 0.95
floatBinaryOperationMethod · 0.95
doubleBinaryOperationMethod · 0.95

Tested by

no test coverage detected