railo.runtime.op
Class Operator

java.lang.Object
  extended by railo.runtime.op.Operator

public final class Operator
extends Object

class to compare objects and primitive value types


Constructor Summary
Operator()
           
 
Method Summary
static boolean _equalsComplex(Set<Object> done, Object left, Object right, boolean caseSensitive)
           
static boolean _equalsComplexEL(Set<Object> done, Object left, Object right, boolean caseSensitive, boolean checkOnlyPublicAppearance)
           
static double bitand(double left, double right)
          bitand operation
static double bitor(double left, double right)
          bitand operation
static int compare(boolean left, boolean right)
          compares a boolean with a boolean
static int compare(boolean left, Date right)
          compares a boolean with a Date
static int compare(boolean left, double right)
          compares a boolean with a double
static int compare(boolean left, Object right)
          compares a boolean with a Object
static int compare(boolean left, String right)
          compares a boolean with a double
static int compare(Castable left, Object right)
           
static int compare(Date left, boolean right)
          compares a Date with a boolean
static int compare(Date left, Date right)
          compares a Date with a Date
static int compare(Date left, double right)
          compares a Date with a double
static int compare(Date left, Object right)
          compares a Date with a Object
static int compare(Date left, String right)
          compares a Date with a String
static int compare(double left, boolean right)
          compares a double with a boolean
static int compare(double left, Date right)
          compares a double with a Date
static int compare(double left, double right)
          compares a double with a double
static int compare(double left, Object right)
          compares a double with a Object
static int compare(double left, String right)
          compares a double with a String
static int compare(Locale left, Object right)
           
static int compare(Locale left, String right)
           
static int compare(Object left, boolean right)
          compares a Object with a boolean
static int compare(Object left, Castable right)
           
static int compare(Object left, Date right)
          compares a Object with a Date
static int compare(Object left, double right)
          compares a Object with a double
static int compare(Object left, Locale right)
           
static int compare(Object left, Object right)
          compares two Objects
static int compare(Object left, String right)
          compares a Object with a String
static int compare(String left, boolean right)
          compares a String with a boolean
static int compare(String left, Date right)
          compares a String with a Date
static int compare(String left, double right)
          compares a String with a double
static int compare(String left, Locale right)
           
static int compare(String left, Object right)
          compares a String with a Object
static int compare(String left, String right)
          compares a String with a String
static CharSequence concat(CharSequence left, CharSequence right)
          concat 2 CharSequences
static boolean ct(Object left, Object right)
          check if left is inside right (String-> ignore case)
static double div(double left, double right)
           
static double divide(double left, double right)
          divide operation
static Double divideRef(Object left, Object right)
           
static Double divRef(Object left, Object right)
           
static boolean eeq(Object left, Object right)
          simple reference compersion
static boolean equals(Object left, Object right, boolean caseSensitive)
          Method to compare to different values, return true of objects are same otherwise false
static boolean equals(Object left, Object right, boolean caseSensitive, boolean allowComplexValues)
           
static boolean equalsComplex(Object left, Object right, boolean caseSensitive)
           
static boolean equalsComplexEL(Object left, Object right, boolean caseSensitive, boolean checkOnlyPublicAppearance)
           
static boolean equalsEL(Object left, Object right, boolean caseSensitive, boolean allowComplexValues)
           
static boolean eqv(boolean left, boolean right)
          Equivalence: Return True if both operands are True or both are False.
static boolean eqv(Object left, Object right)
          Equivalence: Return True if both operands are True or both are False.
static double exponent(double left, double right)
           
static float exponent(float left, float right)
           
static double exponent(Object left, Object right)
          calculate the exponent of the left value
static Double exponentRef(Object left, Object right)
           
static boolean imp(boolean left, boolean right)
          Implication: The statement A IMP B is the equivalent of the logical statement "If A Then B." A IMP B is False only if A is True and B is False.
static boolean imp(Object left, Object right)
          Implication: The statement A IMP B is the equivalent of the logical statement "If A Then B." A IMP B is False only if A is True and B is False.
static double intdiv(double left, double right)
           
static Double intdivRef(Object left, Object right)
           
static double minus(double left, double right)
          minus operation
static Double minusRef(Object left, Object right)
           
static double modulus(double left, double right)
          modulus operation
static Double modulusRef(Object left, Object right)
           
static double multiply(double left, double right)
          multiply operation
static Double multiplyRef(Object left, Object right)
           
static boolean nct(Object left, Object right)
          check if left is not inside right (String-> ignore case)
static boolean neeq(Object left, Object right)
          simple reference compersion
static double plus(double left, double right)
          plus operation
static Double plusRef(Object left, Object right)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Operator

public Operator()
Method Detail

compare

public static int compare(Object left,
                          Object right)
                   throws PageException
compares two Objects

Parameters:
left -
right -
Returns:
different of objects as int
Throws:
PageException

compare

public static int compare(Locale left,
                          Object right)
                   throws PageException
Throws:
PageException

compare

public static int compare(Object left,
                          Locale right)
                   throws PageException
Throws:
PageException

compare

public static int compare(Locale left,
                          String right)

compare

public static int compare(String left,
                          Locale right)

compare

public static int compare(Object left,
                          String right)
                   throws PageException
compares a Object with a String

Parameters:
left -
right -
Returns:
difference as int
Throws:
PageException

compare

public static int compare(String left,
                          Object right)
                   throws PageException
compares a String with a Object

Parameters:
left -
right -
Returns:
difference as int
Throws:
PageException

compare

public static int compare(Object left,
                          double right)
                   throws PageException
compares a Object with a double

Parameters:
left -
right -
Returns:
difference as int
Throws:
PageException

compare

public static int compare(double left,
                          Object right)
                   throws PageException
compares a double with a Object

Parameters:
left -
right -
Returns:
difference as int
Throws:
PageException

compare

public static int compare(Object left,
                          boolean right)
                   throws PageException
compares a Object with a boolean

Parameters:
left -
right -
Returns:
difference as int
Throws:
PageException

compare

public static int compare(boolean left,
                          Object right)
                   throws PageException
compares a boolean with a Object

Parameters:
left -
right -
Returns:
difference as int
Throws:
PageException

compare

public static int compare(Object left,
                          Date right)
                   throws PageException
compares a Object with a Date

Parameters:
left -
right -
Returns:
difference as int
Throws:
PageException

compare

public static int compare(Date left,
                          Object right)
                   throws PageException
compares a Date with a Object

Parameters:
left -
right -
Returns:
difference as int
Throws:
PageException

compare

public static int compare(Castable left,
                          Object right)
                   throws PageException
Throws:
PageException

compare

public static int compare(Object left,
                          Castable right)
                   throws PageException
Throws:
PageException

compare

public static int compare(String left,
                          String right)
compares a String with a String

Parameters:
left -
right -
Returns:
difference as int

compare

public static int compare(String left,
                          double right)
compares a String with a double

Parameters:
left -
right -
Returns:
difference as int

compare

public static int compare(String left,
                          boolean right)
compares a String with a boolean

Parameters:
left -
right -
Returns:
difference as int

compare

public static int compare(String left,
                          Date right)
                   throws PageException
compares a String with a Date

Parameters:
left -
right -
Returns:
difference as int
Throws:
PageException

compare

public static int compare(double left,
                          String right)
compares a double with a String

Parameters:
left -
right -
Returns:
difference as int

compare

public static int compare(double left,
                          double right)
compares a double with a double

Parameters:
left -
right -
Returns:
difference as int

compare

public static int compare(double left,
                          boolean right)
compares a double with a boolean

Parameters:
left -
right -
Returns:
difference as int

compare

public static int compare(double left,
                          Date right)
compares a double with a Date

Parameters:
left -
right -
Returns:
difference as int

compare

public static int compare(boolean left,
                          double right)
compares a boolean with a double

Parameters:
left -
right -
Returns:
difference as int

compare

public static int compare(boolean left,
                          String right)
compares a boolean with a double

Parameters:
left -
right -
Returns:
difference as int

compare

public static int compare(boolean left,
                          boolean right)
compares a boolean with a boolean

Parameters:
left -
right -
Returns:
difference as int

compare

public static int compare(boolean left,
                          Date right)
compares a boolean with a Date

Parameters:
left -
right -
Returns:
difference as int

compare

public static int compare(Date left,
                          String right)
                   throws PageException
compares a Date with a String

Parameters:
left -
right -
Returns:
difference as int
Throws:
PageException

compare

public static int compare(Date left,
                          double right)
compares a Date with a double

Parameters:
left -
right -
Returns:
difference as int

compare

public static int compare(Date left,
                          boolean right)
compares a Date with a boolean

Parameters:
left -
right -
Returns:
difference as int

compare

public static int compare(Date left,
                          Date right)
compares a Date with a Date

Parameters:
left -
right -
Returns:
difference as int

equals

public static boolean equals(Object left,
                             Object right,
                             boolean caseSensitive)
                      throws PageException
Method to compare to different values, return true of objects are same otherwise false

Parameters:
left - left value to compare
right - right value to compare
caseSensitive - check case sensitive or not
Returns:
is same or not
Throws:
PageException

equalsEL

public static boolean equalsEL(Object left,
                               Object right,
                               boolean caseSensitive,
                               boolean allowComplexValues)

equalsComplexEL

public static boolean equalsComplexEL(Object left,
                                      Object right,
                                      boolean caseSensitive,
                                      boolean checkOnlyPublicAppearance)

_equalsComplexEL

public static boolean _equalsComplexEL(Set<Object> done,
                                       Object left,
                                       Object right,
                                       boolean caseSensitive,
                                       boolean checkOnlyPublicAppearance)

equals

public static boolean equals(Object left,
                             Object right,
                             boolean caseSensitive,
                             boolean allowComplexValues)
                      throws PageException
Throws:
PageException

equalsComplex

public static boolean equalsComplex(Object left,
                                    Object right,
                                    boolean caseSensitive)
                             throws PageException
Throws:
PageException

_equalsComplex

public static boolean _equalsComplex(Set<Object> done,
                                     Object left,
                                     Object right,
                                     boolean caseSensitive)
                              throws PageException
Throws:
PageException

ct

public static boolean ct(Object left,
                         Object right)
                  throws PageException
check if left is inside right (String-> ignore case)

Parameters:
left - string to check
right - substring to find in string
Returns:
return if substring has been found
Throws:
PageException

eqv

public static boolean eqv(Object left,
                          Object right)
                   throws PageException
Equivalence: Return True if both operands are True or both are False. The EQV operator is the opposite of the XOR operator. For example, True EQV True is True, but True EQV False is False.

Parameters:
left - value to check
right - value to check
Returns:
result of operation
Throws:
PageException

eqv

public static boolean eqv(boolean left,
                          boolean right)
Equivalence: Return True if both operands are True or both are False. The EQV operator is the opposite of the XOR operator. For example, True EQV True is True, but True EQV False is False.

Parameters:
left - value to check
right - value to check
Returns:
result of operation

imp

public static boolean imp(Object left,
                          Object right)
                   throws PageException
Implication: The statement A IMP B is the equivalent of the logical statement "If A Then B." A IMP B is False only if A is True and B is False. It is True in all other cases.

Parameters:
left - value to check
right - value to check
Returns:
result
Throws:
PageException

imp

public static boolean imp(boolean left,
                          boolean right)
Implication: The statement A IMP B is the equivalent of the logical statement "If A Then B." A IMP B is False only if A is True and B is False. It is True in all other cases.

Parameters:
left - value to check
right - value to check
Returns:
result

nct

public static boolean nct(Object left,
                          Object right)
                   throws PageException
check if left is not inside right (String-> ignore case)

Parameters:
left - string to check
right - substring to find in string
Returns:
return if substring NOT has been found
Throws:
PageException

eeq

public static boolean eeq(Object left,
                          Object right)
                   throws PageException
simple reference compersion

Parameters:
left -
right -
Returns:
Throws:
PageException

neeq

public static boolean neeq(Object left,
                           Object right)
                    throws PageException
simple reference compersion

Parameters:
left -
right -
Returns:
Throws:
PageException

exponent

public static double exponent(Object left,
                              Object right)
                       throws PageException
calculate the exponent of the left value

Parameters:
left - value to get exponent from
right - exponent count
Returns:
return expoinended value
Throws:
PageException

exponent

public static double exponent(double left,
                              double right)

intdiv

public static double intdiv(double left,
                            double right)

div

public static double div(double left,
                         double right)

exponent

public static float exponent(float left,
                             float right)

concat

public static CharSequence concat(CharSequence left,
                                  CharSequence right)
concat 2 CharSequences

Parameters:
left -
right -
Returns:
concated String

plus

public static final double plus(double left,
                                double right)
plus operation

Parameters:
left -
right -
Returns:
result of the opertions

minus

public static double minus(double left,
                           double right)
minus operation

Parameters:
left -
right -
Returns:
result of the opertions

modulus

public static double modulus(double left,
                             double right)
modulus operation

Parameters:
left -
right -
Returns:
result of the opertions

divide

public static double divide(double left,
                            double right)
divide operation

Parameters:
left -
right -
Returns:
result of the opertions

multiply

public static double multiply(double left,
                              double right)
multiply operation

Parameters:
left -
right -
Returns:
result of the opertions

bitand

public static double bitand(double left,
                            double right)
bitand operation

Parameters:
left -
right -
Returns:
result of the opertions

bitor

public static double bitor(double left,
                           double right)
bitand operation

Parameters:
left -
right -
Returns:
result of the opertions

divRef

public static Double divRef(Object left,
                            Object right)
                     throws PageException
Throws:
PageException

exponentRef

public static Double exponentRef(Object left,
                                 Object right)
                          throws PageException
Throws:
PageException

intdivRef

public static Double intdivRef(Object left,
                               Object right)
                        throws PageException
Throws:
PageException

plusRef

public static Double plusRef(Object left,
                             Object right)
                      throws PageException
Throws:
PageException

minusRef

public static Double minusRef(Object left,
                              Object right)
                       throws PageException
Throws:
PageException

modulusRef

public static Double modulusRef(Object left,
                                Object right)
                         throws PageException
Throws:
PageException

divideRef

public static Double divideRef(Object left,
                               Object right)
                        throws PageException
Throws:
PageException

multiplyRef

public static Double multiplyRef(Object left,
                                 Object right)
                          throws PageException
Throws:
PageException


Copyright © 2012 Railo