Follow the links below to browse sample Javadoc for MJ classes and tools, including the MJ Runtime Library.

 

Package: com.arsi.mj.variable  previous next contents

The variable package contains the MJ variable classes and interfaces that provide functionality equivalent to MAPPER variables.

Classes and Interfaces
ICoercedInteger Defines a mechanism for reporting coerced integer length.
IFractionalVariable Defines a numeric variable that can store fractions of a number, i.e., real numbers.
IgnoreCaseComparable This interface is similar to java.lang.Comparable in that it imposes a total ordering on the objects of each class that implements it, but comparison is done without regard to case of alphabetic characters.
IgnoreCaseComparator This interface is similar to java.util.Comparable as a comparison function, which imposes a total ordering on some collection of objects, but without regard to case of alphabetic characters.
IMathFunctions Defines mathematical functions that can be performed on a variable.
IMathOperators Defines mathematical operations that can be performed on a variable.
INumericVariable Defines a numeric variable that can store at least whole (integer) numbers.
IRelationalOperators Defines equivalents for Mapper relational operators used to compare variables.
IVariable Defines methods and operations common to all variables.
IVariableIdentity Marker interface that denotes a variable class that supports a variable name, number or both.
IVariableNameQuery Defines a helper mechanism for querying a variable name or number obtained from an indirect variable reference.
MJDate
MJDecimal
MJDecimalComparatorFactory Concrete factory for looking up variable comparators for MJDecimal.
MJFloat
MJFloatComparatorFactory Concrete factory for looking up variable comparators for MJFloat.
MJFractional Abstract base class for numeric variables that store fractional and whole numbers.
MJInteger
MJIntegerComparatorFactory Concrete factory for looking up variable comparators for MJInteger.
MJListWrapper Adds Map semantics to an encapsulated list.
MJMath Convenience and helper methods for math on MJ variables and numbers.
MJNumber Abstract base class for numeric variables that store at least a whole number.
MJScalar
MJSetSubstringException Exception throw by setSubstring method of numeric variable when SetSubstrOption.PREFER_TYPE_OVER_STRING is specified but resulting value of variable after setting substring is not numeric.
MJString
MJStringComparatorFactory Concrete factory for looking up variable comparators for MJString.
MJSubscriptProxyFactory Factory that wraps java.util.List in a proxy that supports one-based subscripts instead of Java's normal, zero-based subscripts.
MJVariable
MJVariableNameQuery Helper class for querying a variable name or number obtained from an indirect variable reference.
MJVariableNamespace Namespace for MJ variables that stores and organizes variables by variable name and/or number.
MJVariant
VariableComparatorBase Abstract base class for comparators that test an MJ variable of a given type (e.g., MJString) against a Java primitive wrapper (e.g., Long) or another MJ variable type.
VariableComparatorFactoryBase Abstract base factory class for looking up variable comparators for a given MX variable type (e.g., MXString, MXDecimal).

Interface: ICoercedInteger   next package

Defines a mechanism for reporting coerced integer length.
public interface com.arsi.mj.variable.ICoercedInteger
Methods
Get the coerced integer length of a numeric variable.
Returns:
coerced integer length, or -1 if not applicable.
public int coercedIntegerLength()

Interface: IFractionalVariable   previous next package

Defines a numeric variable that can store fractions of a number, i.e., real numbers.
public interface com.arsi.mj.variable.IFractionalVariable
  extends com.arsi.mj.variable.INumericVariable
Methods
Get scale (number of digits to right of decimal, also known as insignificant digits or fractional digits) of this variable.
Returns:
scale of variable.
public int getScale()
Set scale (number of digits to right of decimal) of this variable.
Parameters:
aSize - scale of variable.
public void setScale(int aScale)

Interface: IgnoreCaseComparable   previous next package

This interface is similar to java.lang.Comparable in that it imposes a total ordering on the objects of each class that implements it, but comparison is done without regard to case of alphabetic characters.
public interface com.arsi.mj.variable.IgnoreCaseComparable
Methods
Compares this object with the specified object for order without regard to case of alphabetic characters.
Parameters:
anObject - the object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
See Also:
java.lang.Comparable#compareTo(Object)
public int compareToIgnoreCase(java.lang.Object anObject)

Interface: IgnoreCaseComparator   previous next package

This interface is similar to java.util.Comparable as a comparison function, which imposes a total ordering on some collection of objects, but without regard to case of alphabetic characters. Unlike Comparable, this interface does not define an equals method.
public interface com.arsi.mj.variable.IgnoreCaseComparator
Methods
Compares its two arguments for order, without regard to case of alphabetic characters.
Parameters:
anObj1 - the first object to be compared.
anObj2 - the second object to be compared.
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
See Also:
java.util.Comparable#compare(Object)
public int compareIgnoreCase(java.lang.Object anObj1, java.lang.Object anObj2)

Interface: IMathFunctions   previous next package

Defines mathematical functions that can be performed on a variable.
public interface com.arsi.mj.variable.IMathFunctions
Methods
Absolute value or magnitude of variable.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number abs(java.util.EnumSet someOptions)
Arc cosine of variable in radians.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number acos(java.util.EnumSet someOptions)
Arc sine of variable in radians.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number asin(java.util.EnumSet someOptions)
Arc tangent of variable in radians.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number atan(java.util.EnumSet someOptions)
Cube root of variable.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number cbrt(java.util.EnumSet someOptions)
Cosine of variable in radians.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number cos(java.util.EnumSet someOptions)
Co-tangent of variable in radians.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number ctn(java.util.EnumSet someOptions)
Value of variable (assumed to be radians) expressed in degrees.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number deg(java.util.EnumSet someOptions)
Fractional portion of variable.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
the calculated result
public java.lang.Number frac(java.util.EnumSet someOptions)
Hyperbolic cosine of variable.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number hcos(java.util.EnumSet someOptions)
Hyperbolic sine of variable.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number hsin(java.util.EnumSet someOptions)
Hyperbolic tangent of variable.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number htan(java.util.EnumSet someOptions)
Integer portion of variable (for backward compatibility with INT()).
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
the calculated result
public java.lang.Number intf(java.util.EnumSet someOptions)
Logarithm of variable in base e.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number log(java.util.EnumSet someOptions)
Logarithm of variable in base 10.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number log10(java.util.EnumSet someOptions)
Modulus; remainder value of variable divided by a decimal.
Parameters:
aDec - decimal that is divisor of value of this variable to arrive at remainder.
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number mod(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
Modulus; remainder value of variable divided by a double.
Parameters:
aDbl - double that is divisor of value of this variable to arrive at remainder.
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number mod(java.lang.Double aDbl, java.util.EnumSet someOptions)
Modulus; remainder value of variable divided by an integer.
Parameters:
anInt - integer that is divisor of value of this variable to arrive at remainder.
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number mod(java.lang.Integer anInt, java.util.EnumSet someOptions)
Modulus; remainder value of variable divided by a long integer.
Parameters:
aLong - long integer that is divisor of value of this variable to arrive at remainder.
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number mod(java.lang.Long aLong, java.util.EnumSet someOptions)
Modulus; remainder value of variable divided by another variable.
Parameters:
aVariable - variable whose value is the divisor of value of this variable to arrive at remainder.
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number mod(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
Value of variable (assumed to be degrees) expressed in radians.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number rad(java.util.EnumSet someOptions)
Sine of variable (assumed to be radians).
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number sin(java.util.EnumSet someOptions)
Square root of variable.
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number sqrt(java.util.EnumSet someOptions)
Tangent of variable (assumed to be radians).
Parameters:
someOptions - optional arguments that determine if Java or Mapper number is evaluated and if decimal or double is preferred (if not specified, default is EVALUATE_JAVA_TYPE and PREFER_DECIMAL_OVER_FLOAT).
Returns:
the calculated result
public java.lang.Number tan(java.util.EnumSet someOptions)

Interface: IMathOperators   previous next package

Defines mathematical operations that can be performed on a variable.
public interface com.arsi.mj.variable.IMathOperators
Methods
Add value of this variable to value of decimal.
Parameters:
aDec - decimal whose value is added to value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
sum of this variable and decimal.
public java.lang.Number add(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
Add value of this variable to value of double.
Parameters:
aDbl - double whose value is added to value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
sum of this variable and double.
public java.lang.Number add(java.lang.Double aDbl, java.util.EnumSet someOptions)
Add value of this variable to value of integer.
Parameters:
anInt - integer whose value is added to value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
sum of this variable and integer.
public java.lang.Number add(java.lang.Integer anInt, java.util.EnumSet someOptions)
Add value of this variable to value of long integer.
Parameters:
aLong - long integer whose value is added to value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
sum of this variable and long integer.
public java.lang.Number add(java.lang.Long aLong, java.util.EnumSet someOptions)
Add value of this variable to value of another variable.
Parameters:
aVariable - variable whose value is added to value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
sum of this variable and other variable.
public java.lang.Number add(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
Decrement value of this variable by value of decimal.
Parameters:
aDec - decimal whose value is subtracted from this variable.
public void decrement(java.math.BigDecimal aDec)
Decrement value of this variable by value of double.
Parameters:
aDbl - double whose value is subtracted from this variable.
public void decrement(java.lang.Double aDbl)
Decrement value of this variable by value of integer.
Parameters:
anInt - integer whose value is subtracted from this variable.
public void decrement(java.lang.Integer anInt)
Decrement value of this variable by value of long integer.
Parameters:
aLong - long integer whose value is subtracted from this variable.
public void decrement(java.lang.Long aLong)
Decrement value of this variable by value of another variable.
Parameters:
aVariable - variable whose value is subtracted from this variable.
public void decrement(com.arsi.mj.variable.MJVariable aVariable)
Divide value of this variable by value of decimal.
Parameters:
aDec - decimal whose value is divided by value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
quotient of this variable divided by decimal as a new MJ number.
public java.lang.Number divide(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
Divide value of this variable by value of double.
Parameters:
aDbl - double whose value is divided by value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
quotient of this variable divided by double as a new MJ number.
public java.lang.Number divide(java.lang.Double aDbl, java.util.EnumSet someOptions)
Divide value of this variable by value of integer.
Parameters:
anInt - integer whose value is divided by value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
quotient of this variable divided by integer as a new MJ number.
public java.lang.Number divide(java.lang.Integer anInt, java.util.EnumSet someOptions)
Divide value of this variable by value of long integer.
Parameters:
aLong - long integer whose value is divided by value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
quotient of this variable divided by long integer as a new MJ number.
public java.lang.Number divide(java.lang.Long aLong, java.util.EnumSet someOptions)
Divide value of this variable by value of another variable.
Parameters:
aVariable - variable whose value is divided by value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
quotient of this variable divided by other variable as a new MJ number.
public java.lang.Number divide(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
Divide value of this variable by value of decimal to obtain integer.
Parameters:
aDec - decimal whose value is divided by value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
integer quotient of this variable divided by decimal as a new MJ number.
public java.lang.Number divideToIntegralValue(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
Divide value of this variable by value of double to obtain integer.
Parameters:
aDbl - double whose value is divided by value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
integer quotient of this variable divided by double as a new MJ number.
public java.lang.Number divideToIntegralValue(java.lang.Double aDbl, java.util.EnumSet someOptions)
Divide value of this variable by value of integer to obtain integer.
Parameters:
anInt - integer whose value is divided by value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
integer quotient of this variable divided by integer as a new MJ number.
public java.lang.Number divideToIntegralValue(java.lang.Integer anInt, java.util.EnumSet someOptions)
Divide value of this variable by value of long integer to obtain integer.
Parameters:
aLong - long integer whose value is divided by value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
integer quotient of this variable divided by long integer as a new MJ number.
public java.lang.Number divideToIntegralValue(java.lang.Long aLong, java.util.EnumSet someOptions)
Divide value of this variable by value of another variable to obtain integer.
Parameters:
aVariable - variable whose value is divided by value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
integer quotient of this variable divided by other variable as a new MJ number.
public java.lang.Number divideToIntegralValue(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
Increment value of this variable by value of decimal.
Parameters:
aDec - decimal whose value is added to this variable.
public void increment(java.math.BigDecimal aDec)
Increment value of this variable by value of double.
Parameters:
aDbl - double whose value is added to this variable.
public void increment(java.lang.Double aDbl)
Increment value of this variable by value of integer.
Parameters:
anInt - integer whose value is added to this variable.
public void increment(java.lang.Integer anInt)
Increment value of this variable by value of long integer.
Parameters:
aLong - long integer whose value is added to this variable.
public void increment(java.lang.Long aLong)
Increment value of this variable by value of another variable.
Parameters:
aVariable - variable whose value is added to this variable.
public void increment(com.arsi.mj.variable.MJVariable aVariable)
Multiply value of this variable by value of decimal.
Parameters:
aDec - decimal whose value is multiplied with value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
product of this variable and decimal as a new MJ number.
public java.lang.Number multiply(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
Multiply value of this variable by value of double.
Parameters:
aDbl - double whose value is multiplied with value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
product of this variable and double as a new MJ number.
public java.lang.Number multiply(java.lang.Double aDbl, java.util.EnumSet someOptions)
Multiply value of this variable by value of integer.
Parameters:
anInt - integer whose value is multiplied with value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
product of this variable and integer as a new MJ number.
public java.lang.Number multiply(java.lang.Integer anInt, java.util.EnumSet someOptions)
Multiply value of this variable by value of long integer.
Parameters:
aLong - long integer whose value is multiplied with value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
product of this variable and long integer as a new MJ number.
public java.lang.Number multiply(java.lang.Long aLong, java.util.EnumSet someOptions)
Multiply value of this variable by value of another variable.
Parameters:
aVariable - variable whose value is multiplied with value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
product of this variable and other variable as a new MJ number.
public java.lang.Number multiply(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
Negate value of this variable.
Returns:
negated value of this variable, e.g., (-this).
public java.lang.Number negate()
Raise value of this variable by power of decimal value.
Parameters:
aDec - decimal whose value specifies an exponent.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
value of this variable raised to power of decimal as a new MJ number.
public java.lang.Number pow(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
Raise value of this variable by power of double value.
Parameters:
aDbl - double whose value specifies an exponent.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
value of this variable raised to power of double as a new MJ number.
public java.lang.Number pow(java.lang.Double aDbl, java.util.EnumSet someOptions)
Raise value of this variable by power of integer value.
Parameters:
anInt - integer whose value specifies an exponent.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
value of this variable raised to power of integer as a new MJ number.
public java.lang.Number pow(java.lang.Integer anInt, java.util.EnumSet someOptions)
Raise value of this variable by power of long integer value.
Parameters:
aLong - long integer whose value specifies an exponent.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
value of this variable raised to power of long integer as a new MJ number.
public java.lang.Number pow(java.lang.Long aLong, java.util.EnumSet someOptions)
Raise value of this variable by power of another variable.
Parameters:
aVariable - variable whose value specifies an exponent.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
value of this variable raised to power of other variable as a new MJ number.
public java.lang.Number pow(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
Subtract value of decimal from value of this variable.
Parameters:
aDec - decimal whose value is subtracted from value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
difference between this variable and decimal as a new MJ number.
public java.lang.Number subtract(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
Subtract value of double from value of this variable.
Parameters:
aDbl - double whose value is subtracted from value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
difference between this variable and double as a new MJ number.
public java.lang.Number subtract(java.lang.Double aDbl, java.util.EnumSet someOptions)
Subtract value of integer from value of this variable.
Parameters:
anInt - integer whose value is subtracted from value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
difference between this variable and integer as a new MJ number.
public java.lang.Number subtract(java.lang.Integer anInt, java.util.EnumSet someOptions)
Subtract value of long integer from value of this variable.
Parameters:
aLong - long integer whose value is subtracted from value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
difference between this variable and long integer as a new MJ number.
public java.lang.Number subtract(java.lang.Long aLong, java.util.EnumSet someOptions)
Subtract value of another variable from value of this variable.
Parameters:
aVariable - variable whose value is subtracted from value of this variable.
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
difference between this variable and other variable as a new MJ number.
public java.lang.Number subtract(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
Return value of numeric variable as a number intended as part of mathematical operation (e.g., variables used by the ART command must follow Mapper's rules applicable to math for overflow and squeezing numbers using rounding and scientific notation).
Returns:
value of numeric variable that conforms to Mapper number rules for math; may be NULL or Double.NaN if variable cannot be successfully converted to a Mapper number.
public java.lang.Number toMapperMathNumber()
Get value of this variable as operand to mathematical operation.
Parameters:
someOptions - optional argument that determines if Java or Mapper number is evaluated (if not specified, default is EVALUATE_JAVA_TYPE).
Returns:
value of this variable as math operand; NULL if value of variable is NULL and USE_ZERO_FOR_NULL not specified, or if variable is invalid and USE_ZERO_FOR_INVALID not specified.
public java.lang.Number toMathOperand(java.util.EnumSet someOptions)

Interface: INumericVariable   previous next package

Defines a numeric variable that can store at least whole (integer) numbers.
public interface com.arsi.mj.variable.INumericVariable
Methods
Get the raw numeric value held by this variable as a byte, regardless of whether the variable is valid.
Returns:
raw numeric value held by variable as byte, which may be NULL.
public java.lang.Byte byteValue()
Get the raw numeric value held by this variable as decimal, regardless of whether the variable is valid.
Returns:
raw numeric value held by variable as decimal, which may be NULL.
public java.math.BigDecimal decimalValue()
Get the raw numeric value held by this variable as a double, regardless of whether the variable is valid.
Returns:
raw numeric value held by variable as double, which may be NULL.
public java.lang.Double doubleValue()
Get the raw numeric value held by this variable as a float, regardless of whether the variable is valid.
Returns:
raw numeric value held by variable as float, which may be NULL.
public java.lang.Float floatValue()
Get the raw numeric value held by this variable as 32-bit integer, regardless of whether the variable is valid.
Returns:
raw numeric value held by variable as 32-bit integer, which may be NULL.
public java.lang.Integer intValue()
Get the raw numeric value held by this variable, regardless of whether the variable is valid.
Returns:
raw numeric value held by variable, which may be NULL.
public java.lang.Long longValue()
Get the raw numeric value held by this variable as short, regardless of whether the variable is valid.
Returns:
raw numeric value held by variable as short, which may be NULL.
public java.lang.Short shortValue()
Return value of numeric variable as a "Mapper" number following Mapper's rules for overflow and squeezing numbers using rounding and scientific notation.
Returns:
value of numeric variable that conforms to Mapper number rules; may be NULL or Double.NaN if variable cannot be successfully converted to a Mapper number.
public java.lang.Number toMapperNumber()
Return string representation of numeric variable as a "Mapper" number following Mapper's rules for overflow and squeezing numbers using rounding and scientific notation.
Returns:
string representation of numeric variable that conforms to Mapper number rules; may be NULL or Double.NaN if variable cannot be successfully converted to a Mapper number.
public java.lang.String toMapperNumericString()

Interface: IRelationalOperators   previous next package

Defines equivalents for Mapper relational operators used to compare variables.

The methods here use Mapper rules for object identity if enabled.
public interface com.arsi.mj.variable.IRelationalOperators
Methods
Compare this variable to a decimal for equality using Mapper rules,equivalent to Object.equals(x) == true or Object.equalsIgnoreCase(x) == true, depending upon options.
Parameters:
aDecimal - decimal to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is equal to decimal, false if not.
public boolean EQ(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable to a double for equality using Mapper rules, equivalent to Object.equals(x) == true or Object.equalsIgnoreCase(x) == true, depending upon options.
Parameters:
aDouble - double to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is equal to double, false if not.
public boolean EQ(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable to an integer for equality using Mapper rules, equivalent to Object.equals(x) == true or Object.equalsIgnoreCase(x) == true, depending upon options.
Parameters:
anInt - integer to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is equal to integer, false if not.
public boolean EQ(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable to a long integer for equality using Mapper rules, equivalent to Object.equals(x) == true or Object.equalsIgnoreCase(x) == true, depending upon options.
Parameters:
aLong - long integer to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is equal to long, false if not.
public boolean EQ(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable to another variable for equality using Mapper rules, equivalent to Object.equals(x) == true or Object.equalsIgnoreCase(x) == true, depending upon options.
Parameters:
aVariable - other variable to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is equal to other variable, false if not.
public boolean EQ(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable to a string for equality using Mapper rules, equivalent to Object.equals(x) == true or Object.equalsIgnoreCase(x) == true, depending upon options.
Parameters:
aString - string to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is equal to string, false if not.
public boolean EQ(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as greater than or equal to a decimal using Mapper rules, equivalent to Comparable.compareTo(x) >= 0 or Comparable.compareToIgnoreCase(x) >= 0 depending upon options.
Parameters:
aDecimal - decimal to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is greater than or equal to decimal, false if not.
public boolean GE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as greater than or equal to a double using Mapper rules, equivalent to Comparable.compareTo(x) >= 0 or Comparable.compareToIgnoreCase(x) >= 0 depending upon options.
Parameters:
aDouble - double to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is greater than or equal to double, false if not.
public boolean GE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as greater than or equal to an integer using Mapper rules, equivalent to Comparable.compareTo(x) >= 0 or Comparable.compareToIgnoreCase(x) >= 0 depending upon options.
Parameters:
anInt - integer to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is greater than or equal to integer, false if not.
public boolean GE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as greater than or equal to a long integer using Mapper rules, equivalent to Comparable.compareTo(x) >= 0 or Comparable.compareToIgnoreCase(x) >= 0 depending upon options.
Parameters:
aLong - long integer to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is greater than or equal to long, false if not.
public boolean GE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as greater than or equal to another variable using Mapper rules, equivalent to Comparable.compareTo(x) >= 0 or Comparable.compareToIgnoreCase(x) >= 0 depending upon options.
Parameters:
aVariable - other variable to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is greater than or equal to other variable, false if not.
public boolean GE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as greater than or equal to a string using Mapper rules, equivalent to Comparable.compareTo(x) >= 0 or Comparable.compareToIgnoreCase(x) >= 0 depending upon options.
Parameters:
aString - string to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is greater than or equal to string, false if not.
public boolean GE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as greater than a decimal using Mapper rules, equivalent to Comparable.compareTo(x) > 0.
Parameters:
aDecimal - decimal to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is greater than decimal, false if not.
public boolean GT(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as greater than a double using Mapper rules, equivalent to Comparable.compareTo(x) > 0.
Parameters:
aDouble - double to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is greater than double, false if not.
public boolean GT(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as greater than an integer using Mapper rules, equivalent to Comparable.compareTo(x) > 0.
Parameters:
anInt - integer to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is greater than integer, false if not.
public boolean GT(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as greater than a long integer using Mapper rules, equivalent to Comparable.compareTo(x) > 0.
Parameters:
aLong - long integer to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is greater than long, false if not.
public boolean GT(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as greater than another variable using Mapper rules, equivalent to Comparable.compareTo(x) > 0.
Parameters:
aVariable - other variable to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is greater than other variable, false if not.
public boolean GT(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as greater than a string using Mapper rules, equivalent to Comparable.compareTo(x) > 0.
Parameters:
aString - string to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is greater than string, false if not.
public boolean GT(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as less than or equal to a decimal using Mapper rules, equivalent to Comparable.compareTo(x) <= 0.
Parameters:
aDecimal - decimal to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is less than or equal to decimal, false if not.
public boolean LE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as less than or equal to a double using Mapper rules, equivalent to Comparable.compareTo(x) <= 0.
Parameters:
aDouble - double to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is less than or equal to double, false if not.
public boolean LE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as less than or equal to an integer using Mapper rules, equivalent to Comparable.compareTo(x) <= 0.
Parameters:
anInt - integer to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is less than or equal to integer, false if not.
public boolean LE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as less than or equal to a long integer using Mapper rules, equivalent to Comparable.compareTo(x) <= 0.
Parameters:
aLong - long integer to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is less than or equal to long, false if not.
public boolean LE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as less than or equal to another variable using Mapper rules, equivalent to Comparable.compareTo(x) <= 0.
Parameters:
aVariable - other variable to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is less than or equal to other variable, false if not.
public boolean LE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as less than or equal to a string using Mapper rules, equivalent to Comparable.compareTo(x) <= 0.
Parameters:
aString - string to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is less than or equal to string, false if not.
public boolean LE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as less than a decimal using Mapper rules, equivalent to Comparable.compareTo(x) < 0.
Parameters:
aDecimal - decimal to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is less than decimal, false if not.
public boolean LT(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as less than a double using Mapper rules, equivalent to Comparable.compareTo(x) < 0.
Parameters:
aDouble - double to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is less than double, false if not.
public boolean LT(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as less than an integer using Mapper rules, equivalent to Comparable.compareTo(x) < 0.
Parameters:
anInt - integer to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is less than integer, false if not.
public boolean LT(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as less than a long integer using Mapper rules, equivalent to Comparable.compareTo(x) < 0.
Parameters:
aLong - long integer to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is less than long, false if not.
public boolean LT(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as less than another variable using Mapper rules, equivalent to Comparable.compareTo(x) < 0.
Parameters:
aVariable - other variable to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is less than other variable, false if not.
public boolean LT(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable as less than a string using Mapper rules, equivalent to Comparable.compareTo(x) < 0.
Parameters:
aString - string to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is less than string, false if not.
public boolean LT(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable to a decimal for inequality using Mapper rules, equivalent to Object.equals(x) == false.
Parameters:
aDecimal - decimal to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is equal to decimal, false if not.
public boolean NE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable to a double for inequality using Mapper rules, equivalent to Object.equals(x) == false.
Parameters:
aDouble - double to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is equal to double, false if not.
public boolean NE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable to an integer for inequality using Mapper rules, equivalent to Object.equals(x) == false.
Parameters:
anInt - integer to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is equal to integer, false if not.
public boolean NE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable to a long integer for inequality using Mapper rules, equivalent to Object.equals(x) == false.
Parameters:
aLong - long integer to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is equal to long, false if not.
public boolean NE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable to another variable for inequality using Mapper rules, equivalent to Object.equals(x) == false.
Parameters:
aVariable - other variable to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is equal to other variable, false if not.
public boolean NE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Compare this variable to a string for inequality using Mapper rules, equivalent to Object.equals(x) == false.
Parameters:
aString - string to which this variable compared.
anOption - optional argument that specifies case sensitivity (default is to ignore case).
Returns:
true if this variable is equal to string, false if not.
public boolean NE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)

Interface: IVariable   previous next package

Defines methods and operations common to all variables.
public interface com.arsi.mj.variable.IVariable
Inner Class SetSubstrOption
Enumerated options that affect setSubstring on variable types other than MJString.
public static final class com.arsi.mj.variable.IVariable.SetSubstrOption
  extends java.lang.Enum
Store as MJString after setting substring.
public static final com.arsi.mj.variable.IVariable.SetSubstrOption PREFER_STRING_OVER_TYPE

Keep storing as MJInteger, MJDecimal or MJDate type if valid number or date after setting substring.
public static final com.arsi.mj.variable.IVariable.SetSubstrOption PREFER_TYPE_OVER_STRING

Treat substring being set into variable as string without type checking (e.g., do not check if string appears numeric)
public static final com.arsi.mj.variable.IVariable.SetSubstrOption SET_AS_STRING_LITERAL

public static com.arsi.mj.variable.IVariable.SetSubstrOption valueOf(java.lang.String name)
public static com.arsi.mj.variable.IVariable.SetSubstrOption values()
Methods
Get formatter that produces Mapper-compatible variable output.
Returns:
object responsible for Mapper-compatible formatting of variable.
public com.arsi.mj.text.MJFormatter formatter()
Get Mapper type this variable represents.
Returns:
Mapper variable type, e.g., ALPHANUMERIC (A), FIXED_POINT (F), HOLLERITH (H).
public com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType getMapperType()
Get size (i.e., total width) of this variable.
Returns:
size of variable.
public int getSize()
Determines if variable is using Mapper rules to arrive at variable value for use in equals, hashCode and compareTo. By default, variables do not use Mapper rules for these object identity methods.
Returns:
true if variable is using Mapper rules for equals, hashCode and compareTo, false if raw, "Java" value of variable is used in equals, hashCode and compareTo.
public boolean isUsingMapperObjectIdentity()
Determines if variable represents a valid value.
Returns:
true if variable represents a valid value, false if invalid.
public boolean isValid()
Get the scope (e.g., GLOBAL) of this variable.
Returns:
variable scope or NULL if none.
public com.arsi.mj.VariableScope scope()
Set Mapper type this variable represents.
Parameters:
aType - Mapper variable type.
public void setMapperType(com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aType)
Set whether setSubstring prefers numeric or date types over string type.
Parameters:
someOptions - PREFER_TYPE_OVER_STRING or PREFER_STRING_OVER_TYPE
public void setOptionsForSetSubstr(java.util.EnumSet someOptions)
Set size of this variable. For string types, this is the maximum size of the string. For integer variables, this is total width of an optional sign and the maximum expected number of digits. For floating point and decimal variables, this is the total width of an optional sign, maximum expected number of significant digits (left of decimal), decimal separator and maximum expected number of insignificant digits (right of decimal).
Parameters:
aSize - size (i.e., total width) of variable.
public void setSize(int aSize)
Set portion of variable value starting at specified position and ending after specified number of characters.
Parameters:
aPosition - position (where first character is position 1) in variable to start copying input value.
aCount - number of characters to copy from input value; an error is raised if input is copied beyond the defined size of the variable.
aValue - input value to copy into variable at specified position.
Throws:
MJExecuteException - if input is copied beyond the defined size of the variable.
public void setSubstring(int aPosition, int aCount, java.lang.String aValue)
    throws com.arsi.mj.MJExecuteException
Set portion of variable value starting at specified position and ending after specified number of characters.
Parameters:
aPosition - position (where first character is position 1) in variable to start copying input value.
aCount - number of characters to copy from input value; an error is raised if input is copied beyond the defined size of the variable.
aValue - input value to copy into variable at specified position.
someOptions - options that affect how substring is typed and set into variable; if none or NULL, uses variable's default options for setSubstring established with setOptionsForSetSubstr.
Throws:
MJExecuteException - if input is copied beyond the defined size of the variable.
See Also:
setOptionsForSetSubstr
public void setSubstring(int aPosition, int aCount, java.lang.String aValue, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException
Set portion of variable value starting at specified position and ending after specified number of characters.
Parameters:
aPosition - position (where first character is position 1) in variable to start copying input value.
aCount - number of characters to copy from input value; an error is raised if input is copied beyond the defined size of the variable.
aValue - input value to copy into variable at specified position.
anOption - option that affects how substring is typed and set into variable.
Throws:
MJExecuteException - if input is copied beyond the defined size of the variable.
public void setSubstring(int aPosition, int aCount, java.lang.String aValue, com.arsi.mj.variable.IVariable.SetSubstrOption anOption)
    throws com.arsi.mj.MJExecuteException
Set validity of variable.
Parameters:
aValidFlag - true to mark variable as representing a valid value, false to mark as invalid.
public void setValid(boolean aValidFlag)

Establish whether or not variable uses Mapper rules in equals, hashCode and compareTo.

Using Mapper identity is slower than not using it, i.e., using the raw, "Java" value of a variable is faster than using Mapper rules to arrive at a variable value.
Parameters:
wantMapperObjectIdentity - if true, variable uses Mapper rules, if false, the raw, "Java" value of variable is used in equals, hashCode and compareTo.
public void useMapperObjectIdentity(boolean wantMapperObjectIdentity)

Interface: IVariableIdentity   previous next package

Marker interface that denotes a variable class that supports a variable name, number or both.
public interface com.arsi.mj.variable.IVariableIdentity

Interface: IVariableNameQuery   previous next package

Defines a helper mechanism for querying a variable name or number obtained from an indirect variable reference.
See Also:
MJVariableNameQuery
public interface com.arsi.mj.variable.IVariableNameQuery
Methods
Determine if numbered variable was transformed, i.e., a corresponding Java variable name was provided for the variable number.
Parameters:
aMapperVarnum - the variable number to check if transformed.
Returns:
true if a corresponding Java variable name was provided for the variable number, false if numbered variable was not transformed.
public boolean hasVariableName(int aMapperVarnum)
Get variable namespace associated with a possibly transformed numbered variable.
Parameters:
aMapperVarnum - the variable number for which to obtain the namespace.
Returns:
local variable namespace since numbered variables always have LOCAL scope.
public com.arsi.mj.variable.MJVariableNamespace namespace(int aMapperVarnum)
Get variable namespace associated with a possibly transformed named variable.
Parameters:
aMapperVarname - the variable name for which to obtain the namespace.
Returns:
variable namespace associated with named variable.
public com.arsi.mj.variable.MJVariableNamespace namespace(java.lang.String aMapperVarname)
Get the corresponding Java variable name was provided for the variable number, if any.
Parameters:
aMapperVarnum - the variable number for which to get the corresponding variable name.
Returns:
corresponding variable name, or NULL if numbered variable was not transformed.
public java.lang.String variableName(int aMapperVarnum)
Get the Java variable name corresponding to the provided variable name.
Parameters:
aMapperVarname - the variable name which possibly may be transformed.
Returns:
the transformed variable name, or same the input name if no transformation.
public java.lang.String variableName(java.lang.String aMapperVarname)

Class: MJDate   previous next package

public class com.arsi.mj.variable.MJDate
  extends com.arsi.mj.variable.MJScalar
  implements java.lang.Comparable
Fields
Lower limit for integral time interval values defined by Mapper.
public static final long MAPPER_INTERVAL_LIMIT_LOWER = -9544371L
Upper limit for integral time interval values defined by Mapper.
public static final long MAPPER_INTERVAL_LIMIT_UPPER = 9544371L
Constructors
public MJDate(org.apache.commons.lang3.time.FastDateFormat aDateFmt)
public MJDate(org.apache.commons.lang3.time.FastDateFormat aDateFmt, java.util.TimeZone aTZ)
public MJDate(com.arsi.mj.VariableScope aScope, java.util.Calendar aCal)
public MJDate(com.arsi.mj.VariableScope aScope, java.util.Calendar aCal, java.util.TimeZone aTZ)
public MJDate(com.arsi.mj.VariableScope aScope, java.sql.Date aDate)
public MJDate(com.arsi.mj.VariableScope aScope, java.sql.Date aDate, java.util.TimeZone aTZ)
public MJDate(com.arsi.mj.VariableScope aScope, org.apache.commons.lang3.time.FastDateFormat aDateFmt)
public MJDate(com.arsi.mj.VariableScope aScope, org.apache.commons.lang3.time.FastDateFormat aDateFmt, java.util.TimeZone aTZ)
Methods
Get date object as calendar.
Returns:
date object as calendar, or NULL if variable was cleared.
public java.util.Calendar calendar()
public int compareTo(java.lang.Object anOtherObj)
Get date object as java.util.Date.
Returns:
date object as Java date, or NULL if variable was cleared.
public java.util.Date date()
public boolean equals(java.lang.Object anOtherObj)
public com.arsi.mj.text.MJFormatter formatter()
Obtains the lower bound for date/time data based on a given time zone.
Returns:
the lower-bound date/time
public static java.util.Calendar getMapperDateLowerLimit()
Obtains the lower bound for date/time data based on a given time zone.
Parameters:
aZone - the time zone to use in calculations
Returns:
the lower-bound date/time
public static java.util.Calendar getMapperDateLowerLimit(java.util.TimeZone aZone)
Obtains the lower bound for date/time data based on a given time zone.
Returns:
the lower-bound date/time
public static java.util.Calendar getMapperDateTimeLowerLimit()
Obtains the lower bound for date/time data based on a given time zone.
Parameters:
aZone - the time zone to use in calculations
Returns:
the lower-bound date/time
public static java.util.Calendar getMapperDateTimeLowerLimit(java.util.TimeZone aZone)
Obtains the upper bound for date/time data based on a given time zone.
Returns:
the upper-bound date/time
public static java.util.Calendar getMapperDateTimeUpperLimit()
Obtains the upper bound for date/time data based on a given time zone.
Parameters:
aZone - the time zone to use in calculations
Returns:
the upper-bound date/time
public static java.util.Calendar getMapperDateTimeUpperLimit(java.util.TimeZone aZone)
Obtains the upper bound for date/time data based on a given time zone.
Returns:
the upper-bound date/time
public static java.util.Calendar getMapperDateUpperLimit()
Obtains the upper bound for date/time data based on a given time zone.
Parameters:
aZone - the time zone to use in calculations
Returns:
the upper-bound date/time
public static java.util.Calendar getMapperDateUpperLimit(java.util.TimeZone aZone)
public int hashCode()

Determine if specified quantity of hours is a valid Mapper time interval as implied by Mapper formats TIME4 and TIME5.

For elapsed times, valid times are between -9544371:59:59 and 9544371:59:59.
Parameters:
anElapsedHours - elapsed time expressed as hours; any fractional part is treated as minutes and seconds.
Returns:
true if valid Mapper time interval, false if outside of valid range.
public static boolean isValidMapperInterval(double anElapsedHours)

Determine if specified quantity of hours is a valid Mapper time interval as implied by Mapper formats TIME4 and TIME5.

For elapsed times, valid times are between -9544371:59:59 and 9544371:59:59.
Parameters:
anElapsedHours - elapsed time expressed as hours.
Returns:
true if valid Mapper time interval, false if outside of valid range.
public static boolean isValidMapperInterval(long anElapsedHours)

Determine if specified date is a valid, single-year Mapper date as implied by Mapper formats DATE0 and DATE3.

Single-digit year dates must represent dates in the years between -4 and +5 years from the current date. For example, January 1st, 1996 through December 31st, 2005 assuming the current day was November 1st, 2000.
Parameters:
aCalendar - a date to check for validity.
Returns:
true if valid, single-year Mapper date, false if outside of valid range.
public static boolean isValidMapperYDate(java.util.Calendar aCalendar)

Determine if specified date is a valid, two-digit-year (YY) Mapper date as implied by Mapper formats DATE1, DATE2, DATE5, DATE6 DATE8 and DATE9.

Two-digit year dates must represent dates between 1944 and 2043.
Parameters:
aCalendar - a date to check for validity.
Returns:
true if valid, two-digit-year Mapper date, false if outside of valid range.
public static boolean isValidMapperYYDate(java.util.Calendar aCalendar)

Determine if specified date is a valid, four-digit-year (YYYY) Mapper date as implied by Mapper formats DATE7, DATE11, DATE12, DATE14 DATE15, DATE16, DATE18, DATE19 and DATE20.

Four-digit year dates must represent dates between 1600 and 2299.
Parameters:
aCalendar - a date to check for validity.
Returns:
true if valid, four-digit-year Mapper date, false if outside of valid range.
public static boolean isValidMapperYYYYDate(java.util.Calendar aCalendar)
Convert a date-based construct to a corresponding number of hours. Mapper offsets are based on days from the lower-bound date. The offsets are one-based rather than zero-based, so the minimum value obtained is 1.
Parameters:
aCalendar - the date information to convert.
Returns:
the calculated number of hours
public static long mapperDateToHours(java.util.Calendar aCalendar)
Convert number of days since start of Mapper-defined epoch to a date.
Parameters:
anOffsetInDays - number of whole (integer part) and partial (fractional part) days since January 1st, 1600.
Throws:
MJExecuteException - if the offset is less than or equal to zero
Returns:
date represented by the offset days.
public static java.util.Calendar mapperDaysToDate(double anOffsetInDays)
Convert number of days since start of Mapper-defined epoch to a date.
Parameters:
anOffsetInDays - number of days since January 1st, 1600.
Throws:
MJExecuteException - if the offset is less than or equal to zero
Returns:
date represented by the offset days.
public static java.util.Calendar mapperDaysToDate(long anOffsetInDays)
Create date object by parsing string containing date and/or time in specified format.
Parameters:
aDateStr - contains date and/or time in specified format.
aFmt - format of date/time string.
Throws:
RuntimeException - if date/time string cannot be parsed as a valid date.
Returns:
date object.
public static com.arsi.mj.variable.MJDate parseFromString(java.lang.String aDateStr, org.apache.commons.lang3.time.FastDateFormat aFmt)
    throws java.lang.RuntimeException
Create date object by parsing string containing date and/or time in specified format.
Parameters:
aDateStr - contains date and/or time in specified format.
aFmt - format of date/time string.
Throws:
RuntimeException - if date/time string cannot be parsed as a valid date.
Returns:
date object.
public static com.arsi.mj.variable.MJDate parseFromString(java.lang.String aDateStr, java.text.SimpleDateFormat aFmt)
    throws java.lang.RuntimeException
public void setDate(java.util.Calendar aCal)
public void setDate(java.util.Calendar aCal, java.util.TimeZone aTZ)
public void setDate(java.util.Date aDate)
public void setDate(java.sql.Date aDate)
public void setDate(java.util.Date aDate, java.util.TimeZone aTZ)
public void setDate(java.sql.Date aDate, java.util.TimeZone aTZ)
public void setDate(java.lang.String aDateStr, org.apache.commons.lang3.time.FastDateFormat aFmt)
    throws java.lang.RuntimeException
public void setDate(java.lang.String aDateStr, org.apache.commons.lang3.time.FastDateFormat aFmt, java.util.TimeZone aTZ)
    throws java.lang.RuntimeException
public void setDate(java.lang.String aDateStr, java.text.SimpleDateFormat aFmt)
    throws java.lang.RuntimeException
public void setDate(java.lang.String aDateStr, java.text.SimpleDateFormat aFmt, java.util.TimeZone aTZ)
    throws java.lang.RuntimeException
public void setDate(java.sql.Timestamp aTS)
public void setDate(java.sql.Timestamp aTS, java.util.TimeZone aTZ)
public void setSize(int aSize)
public void setSubstring(int aPosition, int aCount, java.lang.String aValue, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException
public void setTimeZone(java.util.TimeZone aTZ)
public void setValid(boolean aValidFlag)
Get date object as java.sql.Date.
Returns:
date object as SQL date, or NULL if variable was cleared.
public java.sql.Date sqlDate()
Get date object as SQL timestamp.
Returns:
date object as SQL timestamp, or NULL if variable was cleared.
public java.sql.Timestamp sqlTimestamp()
public java.lang.String toString()
public java.lang.String toString(org.apache.commons.lang3.time.FastDateFormat aFmt)
public java.lang.String toString(java.util.Locale aLocale)
public java.lang.String toString(java.text.SimpleDateFormat aFmt)

Class: MJDecimal   previous next package

public class com.arsi.mj.variable.MJDecimal
  extends com.arsi.mj.variable.MJFractional
  implements java.lang.Comparable, com.arsi.mj.variable.IRelationalOperators, com.arsi.mj.variable.IMathOperators, com.arsi.mj.variable.IMathFunctions
Constructors
public MJDecimal(com.arsi.mj.VariableScope aScope, int aVarsize, int aVarscale)
public MJDecimal(com.arsi.mj.VariableScope aScope, int aVarsize, int aVarscale, java.math.BigDecimal aNumber)
public MJDecimal(com.arsi.mj.VariableScope aScope, int aVarsize, int aVarscale, java.util.EnumSet someOptions, java.lang.String aString)
Methods
public java.lang.Number abs(java.util.EnumSet someOptions)
public java.lang.Number acos(java.util.EnumSet someOptions)
public java.lang.Number add(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number add(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number add(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number add(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number add(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number asin(java.util.EnumSet someOptions)
public java.lang.Number atan(java.util.EnumSet someOptions)
public java.lang.Byte byteValue()
public java.lang.Number cbrt(java.util.EnumSet someOptions)

Compare this MJDecimal to a supported operand (String, BigDecimal, Double, Long, Integer, MJString, MJDecimal, MJFloat, MJInteger).

This method uses Mapper rules for object identity if enabled.
See Also:
java.lang.Comparable#compareTo(java.lang.Object), com.arsi.mj.variable.IVariable#isUsingMapperObjectIdentity()
public int compareTo(java.lang.Object anOtherObj)
public java.lang.Number cos(java.util.EnumSet someOptions)
public java.lang.Number ctn(java.util.EnumSet someOptions)
public java.math.BigDecimal decimalValue()
public void decrement(java.math.BigDecimal aDec)
public void decrement(java.lang.Double aDbl)
public void decrement(java.lang.Integer anInt)
public void decrement(java.lang.Long aLong)
public void decrement(com.arsi.mj.variable.MJVariable aVariable)
public java.lang.Number deg(java.util.EnumSet someOptions)
public java.lang.Number divide(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number divide(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number divide(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number divide(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number divide(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Double doubleValue()
public boolean EQ(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)

Indicates whether some other variable is "equal to" this one. This method uses Mapper rules for object identity if enabled.

Note that when checking equality with a BigDecimal without using Mapper rules for object identity, this method follows BigDecimal.compareTo semantics and not BigDecimal.equals.
See Also:
java.lang.Object#equals(java.lang.Object), com.arsi.mj.variable.IVariable#isUsingMapperObjectIdentity()
public boolean equals(java.lang.Object anOtherObj)
public java.lang.Float floatValue()
public com.arsi.mj.text.MJFormatter formatter()
public java.lang.Number frac(java.util.EnumSet someOptions)
public boolean GE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Returns a hash code value for the variable. This method uses Mapper rules for object identity if enabled.
See Also:
java.lang.Object#hashCode(), com.arsi.mj.variable.IVariable#isUsingMapperObjectIdentity()
public int hashCode()
public java.lang.Number hcos(java.util.EnumSet someOptions)
public java.lang.Number hsin(java.util.EnumSet someOptions)
public java.lang.Number htan(java.util.EnumSet someOptions)
public void increment(java.math.BigDecimal aDec)
public void increment(java.lang.Double aDbl)
public void increment(java.lang.Integer anInt)
public void increment(java.lang.Long aLong)
public void increment(com.arsi.mj.variable.MJVariable aVariable)
public java.lang.Number intf(java.util.EnumSet someOptions)
public java.lang.Integer intValue()
public boolean LE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public java.lang.Number log(java.util.EnumSet someOptions)
public java.lang.Number log10(java.util.EnumSet someOptions)
public java.lang.Long longValue()
public boolean LT(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public static void main(java.lang.String args)
public java.lang.Number mod(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number mod(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number mod(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number mod(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number mod(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number multiply(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number multiply(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number multiply(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number multiply(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number multiply(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public boolean NE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public java.lang.Number negate()
public java.lang.Number pow(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number pow(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number pow(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number pow(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number pow(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number rad(java.util.EnumSet someOptions)
public void setDecimal(java.math.BigDecimal aNumber)
public void setDecimal(double aNumber)
public void setDecimal(java.util.EnumSet someOptions, java.lang.String aString)
public void setDecimal(long aNumber)
public void setSize(int aSize)
public void setSubstring(int aPosition, int aCount, java.lang.String aValue, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException
public void setValid(boolean aValidFlag)
public java.lang.Short shortValue()
public java.lang.Number sin(java.util.EnumSet someOptions)
public java.lang.Number sqrt(java.util.EnumSet someOptions)
public java.lang.Number subtract(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number subtract(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number subtract(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number subtract(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number subtract(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number tan(java.util.EnumSet someOptions)
public java.lang.Number toMapperMathNumber()
public java.lang.Number toMapperNumber()
public java.lang.String toMapperNumericString()
public java.lang.Number toMathOperand(java.util.EnumSet someOptions)
Calls toString of underlying BigDecimal.
See Also:
java.lang.Object#toString()
public java.lang.String toString()

Class: MJDecimalComparatorFactory   previous next package

Concrete factory for looking up variable comparators for MJDecimal.

Treat this class as "thread-safe" since it is immutable once created.
public class com.arsi.mj.variable.MJDecimalComparatorFactory
  extends com.arsi.mj.variable.VariableComparatorFactoryBase
Methods
Get singleton instance of this factory.
public static com.arsi.mj.variable.MJDecimalComparatorFactory getInstance()

Class: MJFloat   previous next package

public class com.arsi.mj.variable.MJFloat
  extends com.arsi.mj.variable.MJFractional
  implements java.lang.Comparable, com.arsi.mj.variable.IRelationalOperators, com.arsi.mj.variable.IMathOperators, com.arsi.mj.variable.IMathFunctions
Constructors
public MJFloat(com.arsi.mj.VariableScope aScope, int aVarsize, int aVarscale)
public MJFloat(com.arsi.mj.VariableScope aScope, int aVarsize, int aVarscale, java.lang.Double aNumber)
public MJFloat(com.arsi.mj.VariableScope aScope, int aVarsize, int aVarscale, java.util.EnumSet someOptions, java.lang.String aString)
Methods
public java.lang.Number abs(java.util.EnumSet someOptions)
public java.lang.Number acos(java.util.EnumSet someOptions)
public java.lang.Number add(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number add(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number add(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number add(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number add(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number asin(java.util.EnumSet someOptions)
public java.lang.Number atan(java.util.EnumSet someOptions)
public java.lang.Byte byteValue()
public java.lang.Number cbrt(java.util.EnumSet someOptions)

Compare this MJFloat to a supported operand (String, BigDecimal, Double, Long, Integer, MJString, MJDecimal, MJFloat, MJInteger).

This method uses Mapper rules for object identity if enabled.
See Also:
java.lang.Comparable#compareTo(java.lang.Object), com.arsi.mj.variable.IVariable#isUsingMapperObjectIdentity()
public int compareTo(java.lang.Object anOtherObj)
public java.lang.Number cos(java.util.EnumSet someOptions)
public java.lang.Number ctn(java.util.EnumSet someOptions)
public java.math.BigDecimal decimalValue()
public void decrement(java.math.BigDecimal aDec)
public void decrement(java.lang.Double aDbl)
public void decrement(java.lang.Integer anInt)
public void decrement(java.lang.Long aLong)
public void decrement(com.arsi.mj.variable.MJVariable aVariable)
public java.lang.Number deg(java.util.EnumSet someOptions)
public java.lang.Number divide(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number divide(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number divide(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number divide(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number divide(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Double doubleValue()
public boolean EQ(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Indicates whether some other variable is "equal to" this one. This method uses Mapper rules for object identity if enabled.
See Also:
java.lang.Object#equals(java.lang.Object), com.arsi.mj.variable.IVariable#isUsingMapperObjectIdentity()
public boolean equals(java.lang.Object anOtherObj)
public java.lang.Float floatValue()
public com.arsi.mj.text.MJFormatter formatter()
public java.lang.Number frac(java.util.EnumSet someOptions)
public boolean GE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Returns a hash code value for the variable. This method uses Mapper rules for object identity if enabled.
See Also:
java.lang.Object#hashCode(), com.arsi.mj.variable.IVariable#isUsingMapperObjectIdentity()
public int hashCode()
public java.lang.Number hcos(java.util.EnumSet someOptions)
public java.lang.Number hsin(java.util.EnumSet someOptions)
public java.lang.Number htan(java.util.EnumSet someOptions)
public void increment(java.math.BigDecimal aDec)
public void increment(java.lang.Double aDbl)
public void increment(java.lang.Integer anInt)
public void increment(java.lang.Long aLong)
public void increment(com.arsi.mj.variable.MJVariable aVariable)
public java.lang.Number intf(java.util.EnumSet someOptions)
public java.lang.Integer intValue()
public boolean LE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public java.lang.Number log(java.util.EnumSet someOptions)
public java.lang.Number log10(java.util.EnumSet someOptions)
public java.lang.Long longValue()
public boolean LT(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public java.lang.Number mod(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number mod(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number mod(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number mod(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number mod(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number multiply(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number multiply(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number multiply(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number multiply(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number multiply(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public boolean NE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public java.lang.Number negate()
public java.lang.Number pow(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number pow(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number pow(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number pow(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number pow(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number rad(java.util.EnumSet someOptions)
public void setFloat(java.math.BigDecimal aNumber)
public void setFloat(java.lang.Double aNumber)
public void setFloat(java.util.EnumSet someOptions, com.arsi.mj.variable.MJDecimal aDecvar)
public void setFloat(java.util.EnumSet someOptions, com.arsi.mj.variable.MJFloat aFltvar)
public void setFloat(java.util.EnumSet someOptions, com.arsi.mj.variable.MJInteger anIntvar)
public void setFloat(java.util.EnumSet someOptions, com.arsi.mj.variable.MJString aStrvar)
public void setFloat(java.util.EnumSet someOptions, java.lang.String aString)
public void setFloat(java.lang.Long aNumber)
public void setResult(java.math.BigDecimal aNumber)
public void setResult(double aNumber)
public void setResult(java.util.EnumSet someOptions, java.lang.String aString)
public void setResult(long aNumber)
public void setResult(com.arsi.mj.variable.MJDecimal aDecvar)
public void setResult(com.arsi.mj.variable.MJFloat aFltvar)
public void setResult(com.arsi.mj.variable.MJInteger anIntvar)
public void setResult(com.arsi.mj.variable.MJString aStrvar)
public void setResult(java.lang.String aString)
public void setSize(int aSize)
public void setSubstring(int aPosition, int aCount, java.lang.String aValue, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException
public void setValid(boolean aValidFlag)
public java.lang.Short shortValue()
public java.lang.Number sin(java.util.EnumSet someOptions)
public java.lang.Number sqrt(java.util.EnumSet someOptions)
public java.lang.Number subtract(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number subtract(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number subtract(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number subtract(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number subtract(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number tan(java.util.EnumSet someOptions)
public java.lang.Number toMapperMathNumber()
public java.lang.Number toMapperNumber()
public java.lang.String toMapperNumericString()
public java.lang.Number toMathOperand(java.util.EnumSet someOptions)
Calls toString of underlying Double.
See Also:
java.lang.Object#toString()
public java.lang.String toString()

Class: MJFloatComparatorFactory   previous next package

Concrete factory for looking up variable comparators for MJFloat.

Treat this class as "thread-safe" since it is immutable once created.
public class com.arsi.mj.variable.MJFloatComparatorFactory
  extends com.arsi.mj.variable.VariableComparatorFactoryBase
Methods
Get singleton instance of this factory.
public static com.arsi.mj.variable.MJFloatComparatorFactory getInstance()

Class: MJFractional   previous next package

Abstract base class for numeric variables that store fractional and whole numbers.
public abstract class com.arsi.mj.variable.MJFractional
  extends com.arsi.mj.variable.MJNumber
  implements com.arsi.mj.variable.IFractionalVariable
Fields
Scale, or digits to right of decimal, as defined in Mapper (e.g., 2 if f6.2) of variable.
protected int variableScale
Was fractional part dropped because it did not fit (significant digits were accommodated first)?
protected boolean wasFractionDropped
Constructors
Restricted ctor for initializing an instance of this class.
Parameters:
aScope - scope of variable (or NULL if none).
protected MJFractional(com.arsi.mj.VariableScope aScope)
Methods
public int getScale()
Before setting substring of numeric variable that supports fractions, normalize value being placed into variable. More specifically, if value is a number, convert value to "Mapper" number following Mapper's rules for overflow and squeezing numbers using rounding and scientific notation.
Parameters:
aSubstrCount - count of characters to place into variable (e.g., 5 in Mapper substring expression (2-5)).
aSubstrValue - substring value to place into variable, which may contain fewer characters than aSubstrCount. Remaining places in variable are filled depending upon whether aSubstrValue represents a number (substring value is converted and formatted as Mapper number) or string (padded with spaces).
aScale - declared scale of numeric variable.
aTreatAsStringFlag - if true, aSubstrValue is assumed to represent a string (e.g., content of a quoted string).
aTargetType - Number-derived class that indicates type of Mapper number being targeted, i.e., Long, Double or BigDecimal.
Returns:
normalized substring value.
protected java.lang.String normalizeSubstringBeforeSetting(int aSubstrCount, java.lang.String aSubstrValue, int aWidth, int aScale, boolean aTreatAsStringFlag, java.lang.Class aTargetType)
public void setScale(int aScale)
Check if fractional part of original, initial value of numeric variable was dropped.
Parameters:
anOriginalNumstr - original string value used to initialize numeric variable that supports fractions.
anAdjustedNumstr - string value used to initialize numeric variable after adjustment for load options.
Returns:
true if fractional part of original value was dropped.
protected boolean wasFractionDropped(java.lang.String anOriginalNumstr, java.lang.String anAdjustedNumstr)

Class: MJInteger   previous next package

public class com.arsi.mj.variable.MJInteger
  extends com.arsi.mj.variable.MJNumber
  implements java.lang.Comparable, com.arsi.mj.variable.IRelationalOperators, com.arsi.mj.variable.IMathOperators, com.arsi.mj.variable.IMathFunctions
Constructors
public MJInteger(com.arsi.mj.VariableScope aScope, int aVarsize)
public MJInteger(com.arsi.mj.VariableScope aScope, int aVarsize, java.util.EnumSet someOptions, java.lang.String aString)
public MJInteger(com.arsi.mj.VariableScope aScope, int aVarsize, java.lang.Long aNumber)
Methods
public java.lang.Number abs(java.util.EnumSet someOptions)
public java.lang.Number acos(java.util.EnumSet someOptions)
Add decimal to this integer variable according to options that are passed.
Throws:
MJExecuteException - if MathOption.RETURN_EXACT is specified but sum contains a fractional part.
Returns:
  • BigDecimal when MathOption.PREFER_DECIMAL_OVER_FLOAT is specified or no options are specified.
  • Double when MathOption.PREFER_FLOAT_OVER_DECIMAL is specified
  • Long when MathOption.RETURN_EXACT is specified.
See Also:
com.arsi.mj.variable.IMathOperators#add(java.math.BigDecimal, java.util.EnumSet...)
public java.lang.Number add(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
Add double to this integer variable according to options that are passed.
Throws:
MJExecuteException - if MathOption.RETURN_EXACT is specified but sum contains a fractional part.
Returns:
  • BigDecimal when MathOption.PREFER_DECIMAL_OVER_FLOAT is specified or no options are specified.
  • Double when MathOption.PREFER_FLOAT_OVER_DECIMAL is specified
  • Long when MathOption.RETURN_EXACT is specified.
See Also:
com.arsi.mj.variable.IMathOperators#add(java.lang.Double, java.util.EnumSet...)
public java.lang.Number add(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number add(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number add(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number add(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number asin(java.util.EnumSet someOptions)
public java.lang.Number atan(java.util.EnumSet someOptions)
public java.lang.Byte byteValue()
public java.lang.Number cbrt(java.util.EnumSet someOptions)

Compare this MJInteger to a supported operand (String, BigDecimal, Double, Long, Integer, MJString, MJDecimal, MJFloat, MJInteger).

This method uses Mapper rules for object identity if enabled.
See Also:
java.lang.Comparable#compareTo(java.lang.Object), com.arsi.mj.variable.IVariable#isUsingMapperObjectIdentity()
public int compareTo(java.lang.Object anOtherObj)
public java.lang.Number cos(java.util.EnumSet someOptions)
public java.lang.Number ctn(java.util.EnumSet someOptions)
public java.math.BigDecimal decimalValue()
public void decrement(java.math.BigDecimal aDec)
public void decrement(java.lang.Double aDbl)
public void decrement(java.lang.Integer anInt)
public void decrement(java.lang.Long aLong)
public void decrement(com.arsi.mj.variable.MJVariable aVariable)
public java.lang.Number deg(java.util.EnumSet someOptions)
public java.lang.Number divide(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number divide(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number divide(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number divide(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number divide(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number divideToIntegralValue(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Double doubleValue()
public boolean EQ(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Indicates whether some other variable is "equal to" this one. This method uses Mapper rules for object identity if enabled.
See Also:
java.lang.Object#equals(java.lang.Object), com.arsi.mj.variable.IVariable#isUsingMapperObjectIdentity()
public boolean equals(java.lang.Object anOtherObj)
public java.lang.Float floatValue()
public com.arsi.mj.text.MJFormatter formatter()
public java.lang.Number frac(java.util.EnumSet someOptions)
public boolean GE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Returns a hash code value for the variable. This method uses Mapper rules for object identity if enabled.
See Also:
java.lang.Object#hashCode(), com.arsi.mj.variable.IVariable#isUsingMapperObjectIdentity()
public int hashCode()
public java.lang.Number hcos(java.util.EnumSet someOptions)
public java.lang.Number hsin(java.util.EnumSet someOptions)
public java.lang.Number htan(java.util.EnumSet someOptions)
public void increment(java.math.BigDecimal aDec)
public void increment(java.lang.Double aDbl)
public void increment(java.lang.Integer anInt)
public void increment(java.lang.Long aLong)
public void increment(com.arsi.mj.variable.MJVariable aVariable)
public java.lang.Number intf(java.util.EnumSet someOptions)
public java.lang.Integer intValue()
public boolean LE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public java.lang.Number log(java.util.EnumSet someOptions)
public java.lang.Number log10(java.util.EnumSet someOptions)
public java.lang.Long longValue()
public boolean LT(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public java.lang.Number mod(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number mod(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number mod(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number mod(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number mod(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number multiply(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number multiply(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number multiply(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number multiply(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number multiply(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public boolean NE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public java.lang.Number negate()
public java.lang.Number pow(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number pow(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number pow(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number pow(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number pow(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number rad(java.util.EnumSet someOptions)
public void setInteger(java.math.BigDecimal aNumber)
public void setInteger(double aNumber)
public void setInteger(java.util.EnumSet someOptions, java.lang.String aString)
public void setInteger(java.lang.Long aNumber)
public void setSize(int aSize)
public void setSubstring(int aPosition, int aCount, java.lang.String aValue, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException
public void setValid(boolean aValidFlag)
public java.lang.Short shortValue()
public java.lang.Number sin(java.util.EnumSet someOptions)
public java.lang.Number sqrt(java.util.EnumSet someOptions)
public java.lang.Number subtract(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
public java.lang.Number subtract(java.lang.Double aDbl, java.util.EnumSet someOptions)
public java.lang.Number subtract(java.lang.Integer anInt, java.util.EnumSet someOptions)
public java.lang.Number subtract(java.lang.Long aLong, java.util.EnumSet someOptions)
public java.lang.Number subtract(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
public java.lang.Number tan(java.util.EnumSet someOptions)
public java.lang.Number toMapperMathNumber()
public java.lang.Number toMapperNumber()
public java.lang.String toMapperNumericString()
public java.lang.Number toMathOperand(java.util.EnumSet someOptions)
Calls toString of underlying Long.
See Also:
java.lang.Object#toString()
public java.lang.String toString()

Class: MJIntegerComparatorFactory   previous next package

Concrete factory for looking up variable comparators for MJInteger.

Treat this class as "thread-safe" since it is immutable once created.
public class com.arsi.mj.variable.MJIntegerComparatorFactory
  extends com.arsi.mj.variable.VariableComparatorFactoryBase
Methods
Get Singleton instance of this factory.
public static com.arsi.mj.variable.MJIntegerComparatorFactory getInstance()

Class: MJListWrapper   previous next package

Adds Map semantics to an encapsulated list. This wrapper allows support of one- based index semantics in MJ math formulas.
Parameters:
<T> - the referenced type
public class com.arsi.mj.variable.MJListWrapper
  extends java.lang.Object
  implements java.util.Map
Constructors
Ctor for initializing an instance of this class.
Parameters:
aDelegateList - the content to encapsulate
public MJListWrapper(java.util.List aDelegateList)
Methods
Required implementation.
See Also:
java.util.Map#clear()
public void clear()
Required implementation.
See Also:
java.util.Map#containsKey(java.lang.Object)
public boolean containsKey(java.lang.Object key)
Required implementation.
See Also:
java.util.Map#containsValue(java.lang.Object)
public boolean containsValue(java.lang.Object value)
Required implementation.
See Also:
java.util.Map#entrySet()
public java.util.Set entrySet()
Required implementation.
See Also:
java.util.Map#get(java.lang.Object)
public com.arsi.mj.variable.MJVariable get(java.lang.Object key)
Required implementation.
See Also:
java.util.Map#isEmpty()
public boolean isEmpty()
Required implementation.
See Also:
java.util.Map#keySet()
public java.util.Set keySet()
Required implementation.
See Also:
java.util.Map#put(java.lang.Object, java.lang.Object)
public com.arsi.mj.variable.MJVariable put(java.lang.Integer key, com.arsi.mj.variable.MJVariable value)
Required implementation.
See Also:
java.util.Map#putAll(java.util.Map)
public void putAll(java.util.Map populatedMap)
Required implementation.
See Also:
java.util.Map#remove(java.lang.Object)
public com.arsi.mj.variable.MJVariable remove(java.lang.Object key)
Required implementation.
See Also:
java.util.Map#size()
public int size()
Required implementation.
See Also:
java.util.Map#values()
public java.util.Collection values()

Class: MJMath   previous next package

Convenience and helper methods for math on MJ variables and numbers. For example, this class provides overloaded methods for IMathOperators operations that are not commutative like subtract, division and exponentiation.


public class com.arsi.mj.variable.MJMath
  extends java.lang.Object
Constructors
public MJMath()
Methods
Absolute value or magnitude of string variable that is assumed to contain a number.
Parameters:
aNumericStrvar - string variable whose absolute value is taken.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number abs(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Absolute value or magnitude of number.
Parameters:
aNumber - number whose absolute value is taken.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number abs(java.lang.Number aNumber, java.util.EnumSet someOptions)
Arc cosine of string variable that is assumed to contain a number, in radians.
Parameters:
aNumericStrvar - string variable for which arc cosine is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number acos(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Arc cosine of number in radians.
Parameters:
aNumber - number for which arc cosine is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number acos(java.lang.Number aNumber, java.util.EnumSet someOptions)
public static java.lang.Number add(com.arsi.mj.variable.IMathOperators aAugend, java.lang.Number anAddend, java.util.EnumSet someOptions)
public static java.lang.Number add(com.arsi.mj.variable.MJString aAugend, com.arsi.mj.variable.IMathOperators anAddend, java.util.EnumSet someOptions)
public static java.lang.Number add(java.lang.Number aAugend, com.arsi.mj.variable.IMathOperators anAddend, java.util.EnumSet someOptions)
Arc sine of string variable that is assumed to contain a number, in radians.
Parameters:
aNumericStrvar - string variable for which arc sine is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number asin(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Arc sine of number in radians.
Parameters:
aNumber - number for which arc sine is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number asin(java.lang.Number aNumber, java.util.EnumSet someOptions)
Arc tangent of string variable that is assumed to contain a number, in radians.
Parameters:
aNumericStrvar - string variable for which arc tangent is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number atan(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Arc tangent of number in radians.
Parameters:
aNumber - number for which arc tangent is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number atan(java.lang.Number aNumber, java.util.EnumSet someOptions)
Cube root of string variable that is assumed to contain a number.
Parameters:
aNumericStrvar - string variable whose cube root is taken.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number cbrt(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Cube root of number.
Parameters:
aNumber - number whose cube root is taken.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number cbrt(java.lang.Number aNumber, java.util.EnumSet someOptions)
Cosine of string variable that is assumed to contain a number, in radians.
Parameters:
aNumericStrvar - string variable for which cosine is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number cos(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Cosine of number in radians.
Parameters:
aNumber - number for which cosine is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number cos(java.lang.Number aNumber, java.util.EnumSet someOptions)
Co-tangent of string variable that is assumed to contain a number, in radians.
Parameters:
aNumericStrvar - string variable for which co-tangent is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number ctn(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Co-tangent of number in radians.
Parameters:
aNumber - number for which co-tangent is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number ctn(java.lang.Number aNumber, java.util.EnumSet someOptions)
Value of string variable that is assumed to contain a number (assumed to be radians), expressed in degrees.
Parameters:
aNumericStrvar - string variable to convert to degrees.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number deg(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Value of number (assumed to be radians) expressed in degrees.
Parameters:
aNumber - radians to convert to degrees.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number deg(java.lang.Number aNumber, java.util.EnumSet someOptions)
public static java.lang.Number divide(com.arsi.mj.variable.IMathOperators aDividend, java.lang.Number aDivisor, java.util.EnumSet someOptions)
public static java.lang.Number divide(com.arsi.mj.variable.MJString aDividend, com.arsi.mj.variable.IMathOperators aDivisor, java.util.EnumSet someOptions)
public static java.lang.Number divide(java.lang.Number aDividend, com.arsi.mj.variable.IMathOperators aDivisor, java.util.EnumSet someOptions)
public static java.lang.Number divideToIntegralValue(com.arsi.mj.variable.IMathOperators aDividend, java.lang.Number aDivisor, java.util.EnumSet someOptions)
public static java.lang.Number divideToIntegralValue(com.arsi.mj.variable.MJString aDividend, com.arsi.mj.variable.IMathOperators aDivisor, java.util.EnumSet someOptions)
public static java.lang.Number divideToIntegralValue(java.lang.Number aDividend, com.arsi.mj.variable.IMathOperators aDivisor, java.util.EnumSet someOptions)
Fractional portion of string variable that is assumed to contain a number.
Parameters:
aNumericStrvar - string variable whose fractional portion is taken.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number frac(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Fractional portion of number.
Parameters:
aNumber - number whose fractional portion is taken.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number frac(java.lang.Number aNumber, java.util.EnumSet someOptions)
Hyperbolic cosine of string variable that is assumed to contain a number.
Parameters:
aNumericStrvar - string variable whose hyperbolic cosine is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number hcos(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Hyperbolic cosine of number.
Parameters:
aNumber - number whose hyperbolic cosine is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number hcos(java.lang.Number aNumber, java.util.EnumSet someOptions)
Hyperbolic sine of string variable that is assumed to contain a number.
Parameters:
aNumericStrvar - string variable whose hyperbolic sine is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number hsin(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Hyperbolic sine of number.
Parameters:
aNumber - number whose hyperbolic sine is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number hsin(java.lang.Number aNumber, java.util.EnumSet someOptions)
Hyperbolic tangent of string variable that is assumed to contain a number.
Parameters:
aNumericStrvar - string variable whose hyperbolic tangent is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number htan(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Hyperbolic tangent of number.
Parameters:
aNumber - number whose hyperbolic tangent is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number htan(java.lang.Number aNumber, java.util.EnumSet someOptions)
Integer portion of string variable that is assumed to contain a number.
Parameters:
aNumericStrvar - string variable whose Integer portion is taken.
someOptions - optional argument that determines if decimal or double return value is preferred (e.g., PREFER_DECIMAL_OVER_FLOAT); if not specified, default is to return Long.
public static java.lang.Number intf(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Integer portion of number (for backward compatibility with INT()).
Parameters:
aNumber - number whose integer portion is taken.
someOptions - optional argument that determines if decimal or double return value is preferred (e.g., PREFER_DECIMAL_OVER_FLOAT); if not specified, default is to return Long.
public static java.lang.Number intf(java.lang.Number aNumber, java.util.EnumSet someOptions)
Logarithm of string variable that is assumed to contain a number, in base e.
Parameters:
aNumericStrvar - string variable whose natural logarithm is taken.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number log(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Logarithm of number in base e.
Parameters:
aNumber - number whose natural logarithm is taken.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number log(java.lang.Number aNumber, java.util.EnumSet someOptions)
Logarithm of string variable that is assumed to contain a number, in base 10.
Parameters:
aNumericStrvar - string variable whose logarithm is taken.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number log10(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Logarithm of number in base 10.
Parameters:
aNumber - number whose logarithm is taken.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number log10(java.lang.Number aNumber, java.util.EnumSet someOptions)
public static java.lang.Number mod(com.arsi.mj.variable.IMathFunctions aDividend, java.lang.Number aDivisor, java.util.EnumSet someOptions)
public static java.lang.Number mod(com.arsi.mj.variable.MJString aDividend, com.arsi.mj.variable.IMathFunctions aDivisor, java.util.EnumSet someOptions)
public static java.lang.Number mod(java.lang.Number aDividend, com.arsi.mj.variable.IMathFunctions aDivisor, java.util.EnumSet someOptions)
Modulus; remainder of number divided by another number.
Parameters:
aDividend - number that is divided to arrive at remainder.
aDivisor - number that is divisor to arrive at remainder.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number mod(java.lang.Number aDividend, java.lang.Number aDivisor, java.util.EnumSet someOptions)
public static java.lang.Number multiply(com.arsi.mj.variable.IMathOperators aMultiplicand, java.lang.Number aMultiplier, java.util.EnumSet someOptions)
public static java.lang.Number multiply(com.arsi.mj.variable.MJString aMultiplicand, com.arsi.mj.variable.IMathOperators aMultiplier, java.util.EnumSet someOptions)
public static java.lang.Number multiply(java.lang.Number aMultiplicand, com.arsi.mj.variable.IMathOperators aMultiplier, java.util.EnumSet someOptions)
public static java.lang.Number pow(com.arsi.mj.variable.IMathOperators aBase, java.lang.Number aPower, java.util.EnumSet someOptions)
public static java.lang.Number pow(com.arsi.mj.variable.MJString aBase, com.arsi.mj.variable.IMathOperators aPower, java.util.EnumSet someOptions)
public static java.lang.Number pow(java.lang.Number aBase, com.arsi.mj.variable.IMathOperators aPower, java.util.EnumSet someOptions)
Value of string variable that is assumed to contain a number (assumed to be degrees) expressed in radians.
Parameters:
aNumericStrvar - string variable (degrees) to convert to radians.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number rad(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Value of number (assumed to be degrees) expressed in radians.
Parameters:
aNumber - degrees to convert to radians.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number rad(java.lang.Number aNumber, java.util.EnumSet someOptions)
Sine of string variable that is assumed to contain a number (assumed to be radians).
Parameters:
aNumericStrvar - string variable whose sine is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number sin(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Sine of number (assumed to be radians).
Parameters:
aNumber - number whose sine is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number sin(java.lang.Number aNumber, java.util.EnumSet someOptions)
Square root of string variable that is assumed to contain a number.
Parameters:
aNumericStrvar - string variable whose square root is taken.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number sqrt(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Square root of number.
Parameters:
aNumber - number whose square root is taken.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number sqrt(java.lang.Number aNumber, java.util.EnumSet someOptions)
public static java.lang.Number subtract(com.arsi.mj.variable.IMathOperators aMinuend, java.lang.Number aSubtrahend, java.util.EnumSet someOptions)
public static java.lang.Number subtract(com.arsi.mj.variable.MJString aMinuend, com.arsi.mj.variable.IMathOperators aSubtrahend, java.util.EnumSet someOptions)
public static java.lang.Number subtract(java.lang.Number aMinuend, com.arsi.mj.variable.IMathOperators aSubtrahend, java.util.EnumSet someOptions)
Tangent of string variable that is assumed to contain a number (assumed to be radians).
Parameters:
aNumericStrvar - string variable whose tangent is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number tan(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
Tangent of number (assumed to be radians).
Parameters:
aNumber - number whose tangent is determined.
someOptions - optional argument that determines if decimal or double return value is preferred (if not specified, default is PREFER_DECIMAL_OVER_FLOAT).
public static java.lang.Number tan(java.lang.Number aNumber, java.util.EnumSet someOptions)

Class: MJNumber   previous next package

Abstract base class for numeric variables that store at least a whole number.
public abstract class com.arsi.mj.variable.MJNumber
  extends com.arsi.mj.variable.MJScalar
  implements com.arsi.mj.variable.INumericVariable
Fields
Maximum precision of fixed point numbers used by Mapper in calculations.
public static final int MAX_FIXED_POINT_CALC_PRECISION = 17
Maximum number of rounding digits to keep for fixed point numbers used by Mapper in calculations.
public static final int MAX_FIXED_POINT_CALC_ROUNDING_DIGITS = 19
Maximum scale of fixed point numbers used by Mapper in calculations.
public static final int MAX_FIXED_POINT_CALC_SCALE = 17
Maximum total width of fixed point numbers used by Mapper in calculations.
public static final int MAX_FIXED_POINT_CALC_WIDTH = 22
Maximum precision of fixed point numbers displayed by Mapper.
public static final int MAX_FIXED_POINT_NUMBER_PRECISION = 15
Maximum total width of fixed point numbers (e.g., V1f18.16) supported by Mapper.
public static final int MAX_FIXED_POINT_NUMBER_WIDTH = 18
Maximum scale of fixed point numbers (e.g., V1f18.17) supported by Mapper (Mapper C, different for 2200).
public static final int MAX_FIXED_POINT_SCALE = 17
Maximum precision of integer numbers displayed by Mapper.
public static final int MAX_INTEGER_NUMBER_PRECISION = 15
Maximum total width of integer numbers (e.g., V1I16) supported by Mapper.
public static final int MAX_INTEGER_NUMBER_WIDTH = 16
Maximum scale of integer numbers supported by Mapper (zero since integers have no fractional digits).
public static final int MAX_INTEGER_SCALE = 0
Regular expression for identifying fractional part (or scale) of string, if any.
  • if matches, the first and only capture group contains the fractional digits.

protected static final java.util.regex.Pattern SCALE_DIGITS_REGEX
Constructors
protected MJNumber(com.arsi.mj.VariableScope aScope)
Methods
public static java.math.BigDecimal coerceToMapperBoundsIfNeeded(java.math.BigDecimal aNumber, int aNumberWidth, int aScale, int aMaximumPrecision, int aMaximumWidth, int aNumDigitsToKeepForRounding)
Access value of decimal variable for use as operand of mathematical operation according to specified set of math options.
Parameters:
aFloat - an decimal variable, whose value may be invalid or NULL (variable itself cannot be null).
someOptions - math options that determine how value of variable is evaluated.
Returns:
value of variable as number or NULL if variable cannot be evaluated to a non-NULL value according to specified math options.
public static java.lang.Number mathOperandAccessor(com.arsi.mj.variable.MJDecimal aDecimal, java.util.EnumSet someOptions)
Access value of float variable for use as operand of mathematical operation according to specified set of math options.
Parameters:
aFloat - an float variable, whose value may be invalid or NULL (variable itself cannot be null).
someOptions - math options that determine how value of variable is evaluated.
Returns:
value of variable as number or NULL if variable cannot be evaluated to a non-NULL value according to specified math options.
public static java.lang.Number mathOperandAccessor(com.arsi.mj.variable.MJFloat aFloat, java.util.EnumSet someOptions)
Access value of integer variable for use as operand of mathematical operation according to specified set of math options.
Parameters:
anInteger - an integer variable, whose value may be invalid or NULL (variable itself cannot be null).
someOptions - math options that determine how value of variable is evaluated.
Returns:
value of variable as number or NULL if variable cannot be evaluated to a non-NULL value according to specified math options.
public static java.lang.Number mathOperandAccessor(com.arsi.mj.variable.MJInteger anInteger, java.util.EnumSet someOptions)
Access value of variable for use as operand of mathematical operation according to specified set of math options.
Parameters:
aVariable - a variable, whose value may be invalid or NULL (variable itself cannot be null).
someOptions - math options that determine how value of variable is evaluated.
Returns:
value of variable as number or NULL if variable cannot be evaluated to a non-NULL value according to specified math options.
public static java.lang.Number mathOperandAccessor(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
Convert string to number following Mapper's rules for interpreting value of string variables as numbers.
Parameters:
aString - a string to convert to a number.
aNumberWidth - total allowed width of number (optional negative sign, significant digits, decimal and insignificant digits) represented by double, same as Mapper fixed-point variable size.
aScale - number of insignificant digits, i.e., fractional digits to right of decimal. The returned BigDecimal has this scale.
Returns:
decimal value that conforms to Mapper number rules or NULL if aString cannot be successfully converted to a Mapper number.
public static java.math.BigDecimal parseMapperNumber(java.lang.String aString, int aNumberWidth, int aScale)
Remove commas from possibly numeric string that has been trimmed of spaces per Mapper rules for stripping such commas to arrive at a numeric string of sign, digits and decimal point.
Parameters:
aTrimmedInput - string that has been trimmed of spaces.
Returns:
string removed of commas at those locations where a comma is valid for a Mapper numeric string.
public static java.lang.String removeNumericCommas(char aTrimmedInput)
Convert decimal to a "Mapper" number following Mapper's rules for overflow and squeezing numbers using rounding and scientific notation.
Parameters:
aNumber - a BigDecimal to convert to a Mapper decimal (using floating-point rules).
aNumberWidth - total allowed width of number (optional negative sign, significant digits, decimal and insignificant digits) represented by double, same as Mapper fixed-point variable size.
aScale - number of insignificant digits, i.e., fractional digits to right of decimal. The returned BigDecimal has this scale.
aCoercedIntegerLength - if magnitude of number is such that insignificant digits were dropped to keep significant digits (integer part of number), coerce decimal to integer of this width, favoring the most significant integer digits. Pass -1 if not applicable.
Returns:
decimal value that conforms to Mapper number rules or NULL if BigDecimal cannot be successfully converted to a Mapper number.
public static java.math.BigDecimal toMapperNumber(java.math.BigDecimal aNumber, int aNumberWidth, int aScale, int aCoercedIntegerLength)
Convert decimal to a "Mapper" number following Mapper's rules for overflow and squeezing numbers using rounding and scientific notation.
Parameters:
aNumber - a BigDecimal to convert to a Mapper decimal (using floating-point rules).
aNumberWidth - total allowed width of number (optional negative sign, significant digits, decimal and insignificant digits) represented by double, same as Mapper fixed-point variable size.
aScale - number of insignificant digits, i.e., fractional digits to right of decimal. The returned BigDecimal has this scale.
aCoercedIntegerLength - if magnitude of number is such that insignificant digits were dropped to keep significant digits (integer part of number), coerce decimal to integer of this width, favoring the most significant integer digits. Pass -1 if not applicable.
aRequireIntegerPart - require at least one digit to left of decimal (even if a zero); applies only when number width and scale indicate number is split between integer and fractional parts (e.g., aNumberWidth = 3 and aScale = 2).
Returns:
decimal value that conforms to Mapper number rules or NULL if BigDecimal cannot be successfully converted to a Mapper number.
public static java.math.BigDecimal toMapperNumber(java.math.BigDecimal aNumber, int aNumberWidth, int aScale, int aCoercedIntegerLength, boolean aRequireIntegerPart)
Convert decimal to a "Mapper" number following Mapper's rules for overflow and squeezing numbers using rounding and scientific notation.
Parameters:
aNumber - a BigDecimal to convert to a Mapper decimal (using floating-point rules).
aNumberWidth - total allowed width of number (optional negative sign, significant digits, decimal and insignificant digits) represented by double, same as Mapper fixed-point variable size.
aScale - number of insignificant digits, i.e., fractional digits to right of decimal. The returned BigDecimal has this scale.
aCoercedIntegerLength - if magnitude of number is such that insignificant digits were dropped to keep significant digits (integer part of number), coerce decimal to integer of this width, favoring the most significant integer digits. Pass -1 if not applicable.
aRequireIntegerPart - require at least one digit to left of decimal (even if a zero); applies only when number width and scale indicate number is split between integer and fractional parts (e.g., aNumberWidth = 3 and aScale = 2).
aTargetType - provides hint about Number-derived class that the ultimately stores the Mapper number, i.e., Long, Double or BigDecimal.
Returns:
decimal value that conforms to Mapper number rules or NULL if BigDecimal cannot be successfully converted to a Mapper number.
public static java.math.BigDecimal toMapperNumber(java.math.BigDecimal aNumber, int aNumberWidth, int aScale, int aCoercedIntegerLength, boolean aRequireIntegerPart, java.lang.Class aTargetType)
Convert decimal to a "Mapper" number following Mapper's rules for overflow and squeezing numbers using rounding and scientific notation.
Parameters:
aNumber - a BigDecimal to convert to a Mapper decimal (using floating-point rules).
aNumberWidth - total allowed width of number (optional negative sign, significant digits, decimal and insignificant digits) represented by double, same as Mapper fixed-point variable size.
aScale - number of insignificant digits, i.e., fractional digits to right of decimal. The returned BigDecimal has this scale.
aCoercedIntegerLength - if magnitude of number is such that insignificant digits were dropped to keep significant digits (integer part of number), coerce decimal to integer of this width, favoring the most significant integer digits. Pass -1 if not applicable.
aTargetType - Provides hint about Number-derived class that the ultimately stores the Mapper number, i.e., Long, Double or BigDecimal.
Returns:
decimal value that conforms to Mapper number rules or NULL if BigDecimal cannot be successfully converted to a Mapper number.
public static java.math.BigDecimal toMapperNumber(java.math.BigDecimal aNumber, int aNumberWidth, int aScale, int aCoercedIntegerLength, java.lang.Class aTargetType)
Convert double to a "Mapper" number following Mapper's rules for overflow and squeezing numbers using rounding and scientific notation.
Parameters:
aNumber - a double to convert to a Mapper floating-point number.
aNumberWidth - total allowed width of number (optional negative sign, significant digits, decimal and insignificant digits) represented by double, same as Mapper fixed-point variable size.
aScale - number of insignificant digits, i.e., fractional digits to right of decimal.
aCoercedIntegerLength - if magnitude of number is such that insignificant digits were dropped to keep significant digits (integer part of number), coerce double to integer of this width, favoring the most significant integer digits. Pass -1 if not applicable.
Returns:
numeric value for double that conforms to Mapper number rules or NaN if double cannot be successfully converted to a Mapper number.
public static double toMapperNumber(double aNumber, int aNumberWidth, int aScale, int aCoercedIntegerLength)
Convert double to a "Mapper" number following Mapper's rules for overflow and squeezing numbers using rounding and scientific notation.
Parameters:
aNumber - a double to convert to a Mapper floating-point number.
aNumberWidth - total allowed width of number (optional negative sign, significant digits, decimal and insignificant digits) represented by double, same as Mapper fixed-point variable size.
aScale - number of insignificant digits, i.e., fractional digits to right of decimal.
aCoercedIntegerLength - if magnitude of number is such that insignificant digits were dropped to keep significant digits (integer part of number), coerce double to integer of this width, favoring the most significant integer digits. Pass -1 if not applicable.
aRequireIntegerPart - require at least one digit to left of decimal (even if a zero); applies only when number width and scale indicate number is split between integer and fractional parts (e.g., aNumberWidth = 3 and aScale = 2).
Returns:
numeric value for double that conforms to Mapper number rules or NaN if double cannot be successfully converted to a Mapper number.
public static double toMapperNumber(double aNumber, int aNumberWidth, int aScale, int aCoercedIntegerLength, boolean aRequireIntegerPart)
Convert long integer to a "Mapper" number following Mapper's rules for overflow and squeezing numbers using rounding and scientific notation.
Parameters:
aNumber - a long integer to convert to a Mapper integer.
aNumberWidth - total allowed width of number (optional negative sign and digits) represented by integer, same as Mapper integer variable size.
aPackedLength - if width of number (optional sign followed by digits, including scientific notation) exceeds this size, Mapper outputs aPackedLength characters in place of the number's value. Typically used with packed variables, pass -1 if not applicable.
Returns:
numeric value for long integer that conforms to Mapper number rules or NULL if long integer cannot be successfully converted to a Mapper number.
public static java.lang.Long toMapperNumber(long aNumber, int aNumberWidth, int aPackedLength)
Convert decimal to a "Mapper" numeric string following Mapper's rules for overflow and squeezing numbers using rounding and scientific notation.
Parameters:
aNumber - a BigDecimal to convert to a Mapper numeric string (using floating-point rules).
aNumberWidth - total allowed width of number (optional negative sign, significant digits, decimal and insignificant digits) represented by double, same as Mapper fixed-point variable size.
aScale - number of insignificant digits, i.e., fractional digits to right of decimal.
aCoercedIntegerLength - if magnitude of number is such that insignificant digits were dropped to keep significant digits (integer part of number), coerce decimal to integer of this width, favoring the most significant integer digits. Pass -1 if not applicable.
aRequireIntegerPart - require at least one digit to left of decimal (even if a zero); applies only when number width and scale indicate number is split between integer and fractional parts (e.g., aNumberWidth = 3 and aScale = 2).
Returns:
decimal string that conforms to Mapper number rules or NULL if BigDecimal cannot be successfully converted to a Mapper number.
public static java.lang.String toMapperNumericString(java.math.BigDecimal aNumber, int aNumberWidth, int aScale, int aCoercedIntegerLength, boolean aRequireIntegerPart)
Convert decimal to a "Mapper" numeric string following Mapper's rules for overflow and squeezing numbers using rounding and scientific notation.
Parameters:
aNumber - a BigDecimal to convert to a Mapper numeric string (using floating-point rules).
aNumberWidth - total allowed width of number (optional negative sign, significant digits, decimal and insignificant digits) represented by double, same as Mapper fixed-point variable size.
aScale - number of insignificant digits, i.e., fractional digits to right of decimal.
aCoercedIntegerLength - if magnitude of number is such that insignificant digits were dropped to keep significant digits (integer part of number), coerce decimal to integer of this width, favoring the most significant integer digits. Pass -1 if not applicable.
aRequireIntegerPart - require at least one digit to left of decimal (even if a zero); applies only when number width and scale indicate number is split between integer and fractional parts (e.g., aNumberWidth = 3 and aScale = 2).
aTargetType - provides hint about Number-derived class that the ultimately stores the Mapper number, i.e., Long, Double or BigDecimal.
Returns:
decimal string that conforms to Mapper number rules or NULL if BigDecimal cannot be successfully converted to a Mapper number.
public static java.lang.String toMapperNumericString(java.math.BigDecimal aNumber, int aNumberWidth, int aScale, int aCoercedIntegerLength, boolean aRequireIntegerPart, java.lang.Class aTargetType)
Convert double to a "Mapper" numeric string following Mapper's rules for overflow and squeezing numbers using rounding and scientific notation.
Parameters:
aNumber - a double to convert to a Mapper floating-point string.
aNumberWidth - total allowed width of number (optional negative sign, significant digits, decimal and insignificant digits) represented by double, same as Mapper fixed-point variable size.
aScale - number of insignificant digits, i.e., fractional digits to right of decimal.
aCoercedIntegerLength - if magnitude of number is such that insignificant digits were dropped to keep significant digits (integer part of number), coerce double to integer of this width, favoring the most significant integer digits. Pass -1 if not applicable.
aRequireIntegerPart - require at least one digit to left of decimal (even if a zero); applies only when number width and scale indicate number is split between integer and fractional parts (e.g., aNumberWidth = 3 and aScale = 2).
Returns:
numeric string for double that conforms to Mapper number rules or NaN if double cannot be successfully converted to a Mapper number.
public static java.lang.String toMapperNumericString(double aNumber, int aNumberWidth, int aScale, int aCoercedIntegerLength, boolean aRequireIntegerPart)
Convert long integer to a "Mapper" numeric string following Mapper's rules for overflow and squeezing numbers using rounding and scientific notation.
Parameters:
aNumber - a long integer to convert to a Mapper integer string.
aNumberWidth - total allowed width of number (optional negative sign and digits) represented by integer, same as Mapper integer variable size.
aPackedLength - if width of number (optional sign followed by digits, including scientific notation) exceeds this size, Mapper outputs aPackedLength characters in place of the number's value. Typically used with packed variables, pass -1 if not applicable.
Returns:
numeric string for long integer that conforms to Mapper number rules or NULL if long integer cannot be successfully converted to a Mapper number.
public static java.lang.String toMapperNumericString(long aNumber, int aNumberWidth, int aPackedLength)
protected static java.lang.String trimTrailingFractionalZeros(java.lang.String aNumstr, int aNumberWidth, boolean aRequireIntegerPart)

Class: MJScalar   previous next package

public abstract class com.arsi.mj.variable.MJScalar
  extends com.arsi.mj.variable.MJVariable
Fields
Configured by variable to produce Mapper-compatible, formatted output.
protected com.arsi.mj.text.MJFormatter formatter
Packed size of variable (sets maximum on number of characters stored), -1 if not packed.
protected int packedSize
Use Mapper rules for equals(), hashCode() and compareTo()?
protected boolean useMapperObjectIdentity
Determines if variable represents a valid value.
protected boolean valid
Size (as defined in Mapper, i.e., total width) of variable.
protected int variableSize
Type of Mapper variable.
protected com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType variableType
Constructors
protected MJScalar(com.arsi.mj.VariableScope aScope)
Methods
public com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType getMapperType()
public int getSize()
public boolean isUsingMapperObjectIdentity()
public boolean isValid()
When setting a substring value that is shorted than the substring count:
 @LDV,z <myStr>s15=678          . displays '000000000000678'
 @LDV <myStr>(0-4)=12           . displays '0000000000012  '
 
MAPPER fills to the substring count with trailing spaces, and MJ should keep the trailing spaces. However, the "standard" right-justification formats trim leading and trailing spaces; this method replaces any applied right-justification formats that trim all spaces with right-justification formats that trim only leading spaces.
protected void keepTrailingSpacesIfRightJustified()
Before setting substring integer or string variable, normalize value being placed into variable.
Parameters:
aSubstrCount - count of characters to place into variable (e.g., 5 in Mapper substring expression (2-5)). If zero, place as many characters as there are in aSubstrCount (up to variable width) into variable.
aSubstrValue - substring value to place into variable, which may contain fewer characters than aSubstrCount. Remaining places in variable are filled with spaces.
aWidth - variable width.
Returns:
normalized substring value.
protected java.lang.String normalizeSubstringBeforeSetting(int aSubstrCount, java.lang.String aSubstrValue, int aWidth)
public void setMapperType(com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aType)
Derived, concrete variable classes must provide an implementation that sets variableSize (typically overridden to pass new size to formatter).
See Also:
com.arsi.mj.variable.IVariable#setSize(int)
public abstract void setSize(int aSize)
Derived, concrete variable classes must provide an implementation that sets valid (typically overridden to pass valid flag to formatter).
See Also:
com.arsi.mj.variable.IVariable#setValid(boolean)
public abstract void setValid(boolean aValidFlag)
Apply formatting to value of variable and return as string that does not contain non-numeric character such as spaces or thousands separator (e.g., commas).
Returns:
formatted value of variable.
protected java.lang.String toFormattedSansNonNumeric()
public void useMapperObjectIdentity(boolean wantMapperObjectIdentity)

Exception: MJSetSubstringException   previous next package

Exception throw by setSubstring method of numeric variable when SetSubstrOption.PREFER_TYPE_OVER_STRING is specified but resulting value of variable after setting substring is not numeric.


public class com.arsi.mj.variable.MJSetSubstringException
  extends com.arsi.mj.MJExecuteException
Constructors
public MJSetSubstringException(java.lang.String aPreferTypeOverStringValue)
Methods
Get formatted value of variable that is not numeric, and thus triggered this exception because SetSubstrOption.PREFER_TYPE_OVER_STRING was passed to setSubstring.
Returns:
formatted value of variable that is expected to be numeric but is not.
public final java.lang.String getPreferTypeOverStringValue()

Class: MJString   previous next package

public class com.arsi.mj.variable.MJString
  extends com.arsi.mj.variable.MJScalar
  implements java.lang.CharSequence, java.lang.Comparable, com.arsi.mj.variable.IgnoreCaseComparable, com.arsi.mj.variable.IRelationalOperators
Constructors
public MJString(com.arsi.mj.VariableScope aScope, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVartype, int aVarsize)
public MJString(com.arsi.mj.VariableScope aScope, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVartype, int aVarsize, java.util.EnumSet someOptions, byte someBytes)
public MJString(com.arsi.mj.VariableScope aScope, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVartype, int aVarsize, java.util.EnumSet someOptions, byte someBytes, java.nio.charset.Charset aCharset)
  throws java.io.UnsupportedEncodingException
public MJString(com.arsi.mj.VariableScope aScope, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVartype, int aVarsize, java.util.EnumSet someOptions, byte someBytes, int anOffset, int aCount)
  throws java.lang.IndexOutOfBoundsException
public MJString(com.arsi.mj.VariableScope aScope, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVartype, int aVarsize, java.util.EnumSet someOptions, byte someBytes, int anOffset, int aCount, java.nio.charset.Charset aCharset)
  throws java.lang.IndexOutOfBoundsException, java.io.UnsupportedEncodingException
public MJString(com.arsi.mj.VariableScope aScope, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVartype, int aVarsize, java.util.EnumSet someOptions, byte someBytes, int anOffset, int aCount, java.lang.String aCharsetName)
  throws java.lang.IndexOutOfBoundsException, java.io.UnsupportedEncodingException
public MJString(com.arsi.mj.VariableScope aScope, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVartype, int aVarsize, java.util.EnumSet someOptions, byte someBytes, java.lang.String aCharsetName)
  throws java.io.UnsupportedEncodingException
public MJString(com.arsi.mj.VariableScope aScope, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVartype, int aVarsize, java.util.EnumSet someOptions, char someChars)
public MJString(com.arsi.mj.VariableScope aScope, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVartype, int aVarsize, java.util.EnumSet someOptions, char someChars, int anOffset, int aCount)
  throws java.lang.IndexOutOfBoundsException
public MJString(com.arsi.mj.VariableScope aScope, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVartype, int aVarsize, java.util.EnumSet someOptions, java.lang.String aString)
public MJString(com.arsi.mj.VariableScope aScope, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVartype, int aVarsize, java.util.EnumSet someOptions, java.lang.StringBuffer aBuf)
public MJString(com.arsi.mj.VariableScope aScope, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVartype, int aVarsize, java.util.EnumSet someOptions, java.lang.StringBuilder aBuf)
Methods
public char charAt(int anIndex)

Compare this MJString to a supported operand (String, BigDecimal, Double, Float, Long, Integer, MJString, MJDecimal, MJFloat, MJInteger).

This method is sensitive to case and uses Mapper rules for object identity if enabled.
See Also:
java.lang.Comparable#compareTo(java.lang.Object), com.arsi.mj.variable.IVariable#isUsingMapperObjectIdentity()
public int compareTo(java.lang.Object anOtherObj)

Compare this MJString to a supported operand (String, BigDecimal, Double, Float, Long, Integer, MJString, MJDecimal, MJFloat, MJString) without regard to case of alphabetic characters.

This method ignores case (as the name implies) and uses Mapper rules for object identity if enabled.
See Also:
com.arsi.mj.variable.IgnoreCaseComparable#compareToIgnoreCase(java.lang.Object), com.arsi.mj.variable.IVariable#isUsingMapperObjectIdentity()
public int compareToIgnoreCase(java.lang.Object anOtherObj)
public boolean EQ(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean EQ(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)

Indicates whether some other variable is "equal to" this one. This method is sensitive to case like EQ(CompareOption.CASESENSITIVE), and uses Mapper rules for object identity if enabled.

See Also:
java.lang.Object#equals(java.lang.Object), com.arsi.mj.variable.IVariable#isUsingMapperObjectIdentity()
public boolean equals(java.lang.Object anOtherObj)
public com.arsi.mj.text.MJFormatter formatter()
public boolean GE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean GT(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Returns a hash code value for the variable. This method is sensitive to case and uses Mapper rules for object identity if enabled.
See Also:
java.lang.Object#hashCode(), com.arsi.mj.variable.IVariable#isUsingMapperObjectIdentity()
public int hashCode()
public boolean isUsingAlphaCompare()
public boolean LE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public int length()
public boolean LT(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean LT(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.math.BigDecimal aDecimal, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.Double aDouble, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.Integer anInt, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.Long aLong, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(com.arsi.mj.variable.MJVariable aVariable, com.arsi.mj.variable.MJVariable.CompareOption anOption)
public boolean NE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
Convert string to number following Mapper's rules for interpreting value of string variables as numbers.
Returns:
decimal value that conforms to Mapper number rules or NULL if value of string variable cannot be successfully converted to a Mapper number.
public java.math.BigDecimal parseMapperNumber()
Convert string to number following Mapper's rules for interpreting value of string variables as numbers; specifically, use comparison rules for Mapper type 'A' (alpha) to parse number from string.
Returns:
decimal value that conforms to Mapper number rules or NULL if value of string variable cannot be successfully converted to a Mapper number.
public java.math.BigDecimal parseMapperNumberUsingAlphaCompare()
Convert string to number following Mapper's rules for interpreting value of string variables as numbers; specifically, use comparison rules for Mapper type 'A' (alpha) to parse number from string.
Parameters:
someOptions - optional argument that determines how a NULL or invalid string variable is handled (e.g., USE_ZERO_FOR_NULL and USE_ZERO_FOR_INVALID).
Returns:
decimal value that conforms to Mapper number rules or NULL if value of string variable cannot be successfully converted to a Mapper number.
public java.math.BigDecimal parseMapperNumberUsingAlphaCompare(java.util.EnumSet someOptions)
public void setSize(int aSize)
public void setString(byte someBytes)
public void setString(byte someBytes, java.nio.charset.Charset aCharset)
    throws java.io.UnsupportedEncodingException
public void setString(byte someBytes, int anOffset, int aCount)
    throws java.lang.IndexOutOfBoundsException
public void setString(byte someBytes, int anOffset, int aCount, java.nio.charset.Charset aCharset)
    throws java.lang.IndexOutOfBoundsException, java.io.UnsupportedEncodingException
public void setString(byte someBytes, int anOffset, int aCount, java.lang.String aCharsetName)
    throws java.lang.IndexOutOfBoundsException, java.io.UnsupportedEncodingException
public void setString(byte someBytes, java.lang.String aCharsetName)
    throws java.io.UnsupportedEncodingException
public void setString(char someChars)
public void setString(char someChars, int anOffset, int aCount)
    throws java.lang.IndexOutOfBoundsException
public void setString(java.util.EnumSet someOptions, byte someBytes)
public void setString(java.util.EnumSet someOptions, byte someBytes, java.nio.charset.Charset aCharset)
    throws java.io.UnsupportedEncodingException
public void setString(java.util.EnumSet someOptions, byte someBytes, int anOffset, int aCount)
    throws java.lang.IndexOutOfBoundsException
public void setString(java.util.EnumSet someOptions, byte someBytes, int anOffset, int aCount, java.nio.charset.Charset aCharset)
    throws java.lang.IndexOutOfBoundsException, java.io.UnsupportedEncodingException
public void setString(java.util.EnumSet someOptions, byte someBytes, int anOffset, int aCount, java.lang.String aCharsetName)
    throws java.lang.IndexOutOfBoundsException, java.io.UnsupportedEncodingException
public void setString(java.util.EnumSet someOptions, byte someBytes, java.lang.String aCharsetName)
    throws java.io.UnsupportedEncodingException
public void setString(java.util.EnumSet someOptions, char someChars)
public void setString(java.util.EnumSet someOptions, char someChars, int anOffset, int aCount)
    throws java.lang.IndexOutOfBoundsException
public void setString(java.util.EnumSet someOptions, java.lang.String aString)
public void setString(java.util.EnumSet someOptions, java.lang.StringBuffer aBuf)
public void setString(java.util.EnumSet someOptions, java.lang.StringBuilder aBuf)
public void setString(java.lang.String aString)
public void setString(java.lang.StringBuffer aBuf)
public void setString(java.lang.StringBuilder aBuf)
public void setSubstring(int aPosition, int aCount, java.lang.String aValue, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException
public void setValid(boolean aValidFlag)
public java.lang.CharSequence subSequence(int aStart, int anEnd)
public java.lang.String toString()
public void useAlphaCompare(boolean wantAlphaCompare)

Class: MJStringComparatorFactory   previous next package

Concrete factory for looking up variable comparators for MJString.

Treat this class as "thread-safe" since it is immutable once created.
public class com.arsi.mj.variable.MJStringComparatorFactory
  extends com.arsi.mj.variable.VariableComparatorFactoryBase
Methods
Get Singleton instance of this factory.
public static com.arsi.mj.variable.MJStringComparatorFactory getInstance()

Class: MJSubscriptProxyFactory   previous next package

Factory that wraps java.util.List in a proxy that supports one-based subscripts instead of Java's normal, zero-based subscripts.
public class com.arsi.mj.variable.MJSubscriptProxyFactory
  extends java.lang.Object
Constructors
public MJSubscriptProxyFactory()
Methods
Wrap java.util.List in a proxy that supports one-based subscripts instead of Java's normal, zero-based subscripts.
Parameters:
<T> - the type contained in the List proxy
aList - list to wrap in proxy.
Returns:
proxy for list that supports one-based subscripts (for example, List.get(1) returns the first element in the list).
public static java.util.List countFromOneListProxy(java.util.List aList)

Class: MJVariable   previous next package

public abstract class com.arsi.mj.variable.MJVariable
  extends java.lang.Object
  implements com.arsi.mj.variable.IVariable
Inner Class CompareOption
Mutually exclusive enumerated options that affect comparison of values and variables.
public static final class com.arsi.mj.variable.MJVariable.CompareOption
  extends java.lang.Enum
public static final com.arsi.mj.variable.MJVariable.CompareOption CASESENSITIVE
public static final com.arsi.mj.variable.MJVariable.CompareOption IGNORECASE
public static com.arsi.mj.variable.MJVariable.CompareOption valueOf(java.lang.String name)
public static com.arsi.mj.variable.MJVariable.CompareOption values()
Inner Class LoadOption
Enumerated options that affect assignment of a value to a variable.
public static final class com.arsi.mj.variable.MJVariable.LoadOption
  extends java.lang.Enum
public static final com.arsi.mj.variable.MJVariable.LoadOption LOWERCASE
public static final com.arsi.mj.variable.MJVariable.LoadOption PACK
public static final com.arsi.mj.variable.MJVariable.LoadOption TRIM
public static final com.arsi.mj.variable.MJVariable.LoadOption TRUNCATE
public static final com.arsi.mj.variable.MJVariable.LoadOption UPPERCASE
public static com.arsi.mj.variable.MJVariable.LoadOption valueOf(java.lang.String name)
public static com.arsi.mj.variable.MJVariable.LoadOption values()
Inner Class MathOption
Enumerated options that affect mathematical operations on variable.
public static final class com.arsi.mj.variable.MJVariable.MathOption
  extends java.lang.Enum
Use Java value (e.g., intValue(), decimalValue()) when evaluating operands of mathematical operations.
public static final com.arsi.mj.variable.MJVariable.MathOption EVALUATE_JAVA_TYPE

Use Mapper value (i.e., toMapperNumber()) when evaluating operands of mathematical operations.
public static final com.arsi.mj.variable.MJVariable.MathOption EVALUATE_MAPPER_TYPE

Convert string literals containing real numbers (e.g., '3.14') to BigDecimal.
public static final com.arsi.mj.variable.MJVariable.MathOption PREFER_DECIMAL_OVER_FLOAT

Convert string literals containing real numbers (e.g., '3.14') to Double.
public static final com.arsi.mj.variable.MJVariable.MathOption PREFER_FLOAT_OVER_DECIMAL

Return exact numeric result only, report error if truncation would occur.
public static final com.arsi.mj.variable.MJVariable.MathOption RETURN_EXACT

If operand of mathematical operation is invalid, treat as zero during evaluation.
public static final com.arsi.mj.variable.MJVariable.MathOption USE_ZERO_FOR_INVALID

If operand of mathematical operation has NULL value, treat as zero during evaluation.
public static final com.arsi.mj.variable.MJVariable.MathOption USE_ZERO_FOR_NULL

public static com.arsi.mj.variable.MJVariable.MathOption valueOf(java.lang.String name)
public static com.arsi.mj.variable.MJVariable.MathOption values()
Fields
Java math context used for division of MJ variables.
public static java.math.MathContext DIVISION_MATH_CONTEXT
Maximum size of MJString of type MaprptVariableType.ALPHANUMERIC.
public static final int MAX_ALPHANUMERIC_SIZE = 16
Maximum size of MJString of type MaprptVariableType.HOLLERITH.
public static final int MAX_HOLLERITH_SIZE = 18
Maximum size of MJInteger of type MaprptVariableType.INTEGER.
public static final int MAX_INTEGER_SIZE = 16
Java math context used for multiplication of MJ variables.
public static java.math.MathContext MULTIPLICATION_MATH_CONTEXT
Null variable scope signifies that variable has no scope.
public static final com.arsi.mj.VariableScope NO_SCOPE
toString representation of null.
public static final java.lang.String NULL_AS_STRING = ""
Java math context used for raising of MJ variables to power of exponent.
public static java.math.MathContext POWER_MATH_CONTEXT
Java math context used for remainder of MJ variables.
public static java.math.MathContext REMAINDER_MATH_CONTEXT
Scope of this variable, NULL if none defined.
protected final com.arsi.mj.VariableScope scope
Determines if setSubstring prefers numeric or date types over string type.
protected java.util.EnumSet setSubstrOptions
Constructors
protected MJVariable(com.arsi.mj.VariableScope aScope)
Methods
Adjust string contents according to specified assignment options.
Parameters:
aString - string to adjust (if NULL, no adjustment is made).
aMaximumLength - maximum allowed length of string.
someOptions - assignment options, if any (may be empty enumeration set).
Returns:
adjusted string.
public static java.lang.String adjustString(java.lang.String aString, int aMaximumLength, java.util.EnumSet someOptions)
Verify that required MathOptions are present in a set of such options.
Parameters:
someOptions - set of math options.
aClassOfExpectedResult - Number-derived class of expected result of mathematical operation, can be NULL.
Throws:
IllegalArgumentException - if required MathOptions are missing.
public static void checkIllegalMathOptionArgument(java.util.EnumSet someOptions, java.lang.Class aClassOfExpectedResult)
    throws java.lang.IllegalArgumentException
Get default MathOptions to use for mathematical operations on MJ variables if explicit math options not specified.
Returns:
set of default math options that favor Java evaluation over Mapper evaluation.
public static java.util.EnumSet defaultMathOptions()

Determine if java.lang.ArithmeticException should be thrown instead of being handled internally (e.g., marking a variable as invalid) during certain, long integer type conversions.

During migration from Mapper to MJ, it may be easier to debug an application if java.lang.ArithmeticException is thrown immediately.
Returns:
true if java.lang.ArithmeticException should be thrown, false if exception should be handled internally.
public static boolean preferArithmeticException()
public com.arsi.mj.VariableScope scope()
Set whether setSubstring prefers numeric or date types over string type. By default, MJInteger, MJDecimal, MJDate and MJVariant prefer numeric or date types while MJString prefers string type.
Parameters:
someOptions - PREFER_TYPE_OVER_STRING or PREFER_STRING_OVER_TYPE
public void setOptionsForSetSubstr(java.util.EnumSet someOptions)
public void setSubstring(int aPosition, int aCount, java.lang.String aValue)
    throws com.arsi.mj.MJExecuteException
Derived, concrete variable classes must provide an implementation.
See Also:
com.arsi.mj.variable.IVariable#setSubstring(int, int, java.lang.String)
public abstract void setSubstring(int aPosition, int aCount, java.lang.String aValue, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException
public void setSubstring(int aPosition, int aCount, java.lang.String aValue, com.arsi.mj.variable.IVariable.SetSubstrOption anOption)
    throws com.arsi.mj.MJExecuteException
Returns a synchronized MJ date backed by the specified date variable. To guarantee serial access, it is critical that all access to the backing variable is accomplished through the returned variable.
Parameters:
aVariable - the date variable to be "wrapped" in a synchronized variable.
Returns:
a synchronized view of the specified variable.
public static com.arsi.mj.variable.MJDate synchronizedDate(com.arsi.mj.variable.MJDate aVariable)
Returns a synchronized MJ decimal backed by the specified decimal variable. To guarantee serial access, it is critical that all access to the backing variable is accomplished through the returned variable.
Parameters:
aVariable - the decimal variable to be "wrapped" in a synchronized variable.
Returns:
a synchronized view of the specified variable.
public static com.arsi.mj.variable.MJDecimal synchronizedDecimal(com.arsi.mj.variable.MJDecimal aVariable)
Returns a synchronized MJ float backed by the specified float variable. To guarantee serial access, it is critical that all access to the backing variable is accomplished through the returned variable.
Parameters:
aVariable - the float variable to be "wrapped" in a synchronized variable.
Returns:
a synchronized view of the specified variable.
public static com.arsi.mj.variable.MJFloat synchronizedFloat(com.arsi.mj.variable.MJFloat aVariable)
Returns a synchronized MJ integer backed by the specified integer variable. To guarantee serial access, it is critical that all access to the backing variable is accomplished through the returned variable.
Parameters:
aVariable - the integer variable to be "wrapped" in a synchronized variable.
Returns:
a synchronized view of the specified variable.
public static com.arsi.mj.variable.MJInteger synchronizedInteger(com.arsi.mj.variable.MJInteger aVariable)
Returns a synchronized MJ string backed by the specified string variable. To guarantee serial access, it is critical that all access to the backing variable is accomplished through the returned variable.
Parameters:
aVariable - the string variable to be "wrapped" in a synchronized variable.
Returns:
a synchronized view of the specified variable.
public static com.arsi.mj.variable.MJString synchronizedString(com.arsi.mj.variable.MJString aVariable)
Returns a synchronized MJ variant backed by the specified variant variable. To guarantee serial access, it is critical that all access to the backing variable is accomplished through the returned variable.
Parameters:
aVariable - the variant variable to be "wrapped" in a synchronized variable.
Returns:
a synchronized view of the specified variable.
public static com.arsi.mj.variable.MJVariant synchronizedVariant(com.arsi.mj.variable.MJVariant aVariable)
Validate that declared size of emulated Mapper variable is valid for variable type.
Parameters:
aVartype - Mapper variable type (e.g., HOLLERITH or h).
aVarsize - size of Mapper variable being emulated (e.g., <myVar>h14).
aVarscale - if applicable, scale of Mapper variable being emulated (e.g., 4 in <myVar>f12.4).
Throws:
MJExecuteException - if size of ALPHANUMERIC, HOLLERITH or INTEGER variable exceeds Mapper limits.
protected void validateVariableSizeByType(com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVartype, int aVarsize, int aVarscale)
    throws com.arsi.mj.MJExecuteException

Class: MJVariableNameQuery   previous next package

Helper class for querying a variable name or number obtained from an indirect variable reference.
public class com.arsi.mj.variable.MJVariableNameQuery
  extends java.lang.Object
  implements com.arsi.mj.variable.IVariableNameQuery
Fields
Environmental variable namespace.
public final com.arsi.mj.variable.MJVariableNamespace envNamespace
Global variable namespace.
public final com.arsi.mj.variable.MJVariableNamespace globalNamespace
Local variable namespace.
public final com.arsi.mj.variable.MJVariableNamespace localNamespace
Initialized variable transformer.
public final com.arsi.mj.maprpt.vidxform.MJVariableIdentifierTransformer variableIdTransformer
Constructors
Public ctor for initializing an instance of this class.
Parameters:
aGlobalNS - global variable namespace.
aEnvNS - environmental variable namespace.
aLocalNS - local variable namespace.
aTransformer - variable name transformer.
public MJVariableNameQuery(com.arsi.mj.variable.MJVariableNamespace aGlobalNS, com.arsi.mj.variable.MJVariableNamespace aEnvNS, com.arsi.mj.variable.MJVariableNamespace aLocalNS, com.arsi.mj.maprpt.vidxform.MJVariableIdentifierTransformer aTransformer)
Methods
public boolean hasVariableName(int aMapperVarnum)
public com.arsi.mj.variable.MJVariableNamespace namespace(int aMapperVarnum)
public com.arsi.mj.variable.MJVariableNamespace namespace(java.lang.String aMapperVarname)
Given a variable scope, return the corresponding LOCAL, GLOBAL or ENVIRONMENT variable namespace.
Parameters:
aScope - a variable scope.
Returns:
corresponding variable namespace or NULL if none.
public com.arsi.mj.variable.MJVariableNamespace scopeToNamespace(com.arsi.mj.VariableScope aScope)
public java.lang.String variableName(int aMapperVarnum)
public java.lang.String variableName(java.lang.String aMapperVarname)

Class: MJVariableNamespace   previous next package

Namespace for MJ variables that stores and organizes variables by variable name and/or number.

Treat this class as "thread-safe" since methods that might concurrently access or modify the namespace are synchronized.


public class com.arsi.mj.variable.MJVariableNamespace
  extends java.lang.Object
Inner Class NamespaceKey
Nested class that defines key for mapping variable identities to variables.
public static class com.arsi.mj.variable.MJVariableNamespace.NamespaceKey
  extends java.lang.Object
The type of key used to reference the variable within the namespace.
public final com.arsi.mj.variable.MJVariableNamespace.TypeOfKey keyType

The key value (String or Integer) used to reference the variable within the namespace.
public final java.lang.Object keyValue

Public ctor for initializing an instance of this class.
Parameters:
aType - the type of key
aValue - the key value (String or Integer)
public MJVariableNamespace.NamespaceKey(com.arsi.mj.variable.MJVariableNamespace.TypeOfKey aType, java.lang.Object aValue)
public boolean equals(java.lang.Object anObject)
public int hashCode()
Inner Class TypeOfKey
Defines type of map key, either variable name or number.
public static final class com.arsi.mj.variable.MJVariableNamespace.TypeOfKey
  extends java.lang.Enum
Indicates a key that contains a variable name reference.
public static final com.arsi.mj.variable.MJVariableNamespace.TypeOfKey NAME

Indicates a key that contains a variable number reference.
public static final com.arsi.mj.variable.MJVariableNamespace.TypeOfKey NUMBER

public static com.arsi.mj.variable.MJVariableNamespace.TypeOfKey valueOf(java.lang.String name)
public static com.arsi.mj.variable.MJVariableNamespace.TypeOfKey values()
Constructors
Public ctor for initializing an instance of this class.
Parameters:
aScope - scope of all variables and arrays stored in this namespace (e.g., GLOBAL).
public MJVariableNamespace(com.arsi.mj.VariableScope aScope)
Methods
Add numbered array of variables to this variable namespace.
Parameters:
aVarnum - number of variable array.
anArray - array to add and associate with aVarnum.
public void addArray(int aVarnum, java.util.List anArray)
Add aliased array of variables to this variable namespace.
Parameters:
aVarnum - number of variable array.
aVarname - name of variable array.
anArray - array to add and associate with aVarname and aVarnum.
public void addArray(int aVarnum, java.lang.String aVarname, java.util.List anArray)
Add named array of variables to this variable namespace.
Parameters:
aVarname - name of variable array.
anArray - array to add and associate with aVarname.
public void addArray(java.lang.String aVarname, java.util.List anArray)
Add aliased variable (has both number and name) to this variable namespace.
Parameters:
aVariable - aliased variable to add.
public void addVariable(com.arsi.mj.variable.aliased.IAliasedVariable aVariable)
Add named variable to this variable namespace.
Parameters:
aVariable - named variable to add.
public void addVariable(com.arsi.mj.variable.named.INamedVariable aVariable)
Add numbered variable to this variable namespace.
Parameters:
aVariable - numbered variable to add.
public void addVariable(com.arsi.mj.variable.numbered.INumberedVariable aVariable)
Iterate over arrays in namespace.
Returns:
iterator of arrays in namespace.
public java.util.Iterator arrayIterator()
Lookup numbered array.
Parameters:
aVarnum - number of variable array.
Returns:
variable array that exists in namespace with specified number, or NULL if none.
public final java.util.List lookupArray(int aVarnum)
Lookup named and typed array.
Parameters:
<T> - the expected return type
aVarnum - number of variable array.
aKlass - MJVariable-derived class to which the returned variable array is cast.
Returns:
variable array that exists in namespace with specified number, or NULL if none.
public final java.util.List lookupArray(int aVarnum, java.lang.Class aKlass)
Lookup named array.
Parameters:
aVarname - name of variable array.
Returns:
variable array that exists in namespace with specified name, or NULL if none.
public final java.util.List lookupArray(java.lang.String aVarname)
Lookup named and typed array.
Parameters:
<T> - the expected return type
aVarname - name of variable array.
aKlass - MJVariable-derived class to which the returned variable array is cast.
Returns:
variable array that exists in namespace with specified name, or NULL if none.
public final java.util.List lookupArray(java.lang.String aVarname, java.lang.Class aKlass)
Lookup numbered integer variable.
Parameters:
aVarnum - number of variable.
Throws:
MJExecuteException - if variable exists with specified number but is not an integer.
Returns:
integer variable that exists in namespace with specified number, or NULL if none.
public com.arsi.mj.variable.numbered.MJNumberedInteger lookupInteger(int aVarnum)
    throws com.arsi.mj.MJExecuteException
Lookup named integer variable.
Parameters:
aVarname - name of variable.
Throws:
MJExecuteException - if variable exists with specified name but is not an integer.
Returns:
integer variable that exists in namespace with specified name, or NULL if none.
public com.arsi.mj.variable.named.MJNamedInteger lookupInteger(java.lang.String aVarname)
    throws com.arsi.mj.MJExecuteException
Lookup numbered variable.
Parameters:
aVarnum - number of variable.
Returns:
variable that exists in namespace with specified number, or NULL if none.
public com.arsi.mj.variable.MJVariable lookupVariable(int aVarnum)
Lookup numbered and typed variable.
Parameters:
<T> - the expected return type
aVarnum - number of variable.
aKlass - MJVariable-derived class to which the returned variable instance is cast.
Returns:
variable that exists in namespace with specified number, or NULL if none.
public com.arsi.mj.variable.MJVariable lookupVariable(int aVarnum, java.lang.Class aKlass)
Lookup named variable.
Parameters:
aVarname - name of variable.
Returns:
variable that exists in namespace with specified name, or NULL if none.
public com.arsi.mj.variable.MJVariable lookupVariable(java.lang.String aVarname)
Lookup named and typed variable.
Parameters:
<T> - the expected return type
aVarname - name of variable.
aKlass - MJVariable-derived class to which the returned variable instance is cast.
Returns:
typed variable that exists in namespace with specified name, or NULL if none.
public com.arsi.mj.variable.MJVariable lookupVariable(java.lang.String aVarname, java.lang.Class aKlass)
Get scope of all variables and arrays stored in this namespace.
Returns:
variable scope (e.g., GLOBAL).
public final com.arsi.mj.VariableScope scope()
Iterate over variables in namespace.
Returns:
iterator of variables in namespace.
public java.util.Iterator variableIterator()

Class: MJVariant   previous next package

public class com.arsi.mj.variable.MJVariant
  extends com.arsi.mj.variable.MJVariable
Fields
Scalar mapper variable held by this variant instance.
protected com.arsi.mj.variable.MJScalar scalar
Constructors
protected MJVariant(com.arsi.mj.VariableScope aScope)
Methods
public com.arsi.mj.text.MJFormatter formatter()
public com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType getMapperType()
public int getSize()
public boolean isUsingMapperObjectIdentity()
public boolean isValid()
public void setMapperType(com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aType)
public void setSize(int aSize)
public void setSubstring(int aPosition, int aCount, java.lang.String aValue, java.util.EnumSet someOptions)
    throws com.arsi.mj.MJExecuteException
public void setValid(boolean aValidFlag)
public void useMapperObjectIdentity(boolean wantMapperObjectIdentity)

Class: VariableComparatorBase   previous next package

Abstract base class for comparators that test an MJ variable of a given type (e.g., MJString) against a Java primitive wrapper (e.g., Long) or another MJ variable type. All variable comparators should derive from this parent class.

Treat this class as "thread-safe" since it contains no state; derived classes must also be state-less and thread-safe since comparator instances are shared.
Parameters:
<A1> - target MJ variable class (e.g., MJString), this is always the first argument (object1) in Comparator.compare(object1, object2).
<A2> - object type to compare to target (e.g., Double, MJInteger), always the second argument (object2) in Comparator.compare(object1, object2).
public abstract class com.arsi.mj.variable.VariableComparatorBase
  extends java.lang.Object
  implements java.util.Comparator, com.arsi.mj.variable.IgnoreCaseComparator
Constructors
public VariableComparatorBase()
Methods
Subclasses must override this method, calling the superclass first to verify arguments are the expected types (generic parameters A1 and A2).
Throws:
IllegalArgumentException - if anObj1 is not of generic type parameter A1 (but can be NULL) or anObj2 is not of generic type parameter A2 (but can be NULL).
See Also:
java.util.Comparator#compare(java.lang.Object, java.lang.Object)
public int compare(java.lang.Object anObj1, java.lang.Object anObj2)

Subclasses must override this method to perform case-insensitive comparison , calling the superclass first to verify arguments are the expected types (generic parameters A1 and A2).

If case-insensitive comparison is not applicable, a subclass should override this method and delegate to compare, meaning both methods perform the equivalent comparison.

Throws:
IllegalArgumentException - if anObj1 is not of generic type parameter A1 (but can be NULL) or anObj2 is not of generic type parameter A2 (but can be NULL).
See Also:
com.arsi.mj.variable.IgnoreCaseComparator#compareIgnoreCase(java.lang.Object, java.lang.Object)
public int compareIgnoreCase(java.lang.Object anObj1, java.lang.Object anObj2)
Subclasses must define to return the class of object1 (generic parameter A1).
public abstract java.lang.Class getTypeOfObject1()
Subclasses must define to return the class of object2 (generic parameter A2).
public abstract java.lang.Class getTypeOfObject2()

Class: VariableComparatorFactoryBase   previous package

Abstract base factory class for looking up variable comparators for a given MX variable type (e.g., MXString, MXDecimal). All variable comparator factories should derive from this parent class.

Treat this class as "thread-safe" since it is designed to be immutable once created (i.e., addComparator is called in the ctor of the derived class but no other changes to state).

Parameters:
<T> - target MX variable class (e.g., MXString), always the first argument (object1) in Comparator.compare(object1, object2).
public class com.arsi.mj.variable.VariableComparatorFactoryBase
  extends java.lang.Object
Constructors
public VariableComparatorFactoryBase()
Methods
Add comparator instance for object2 type to comparators for this target MX variable type.
Parameters:
anObject2Klass - class that defines type of object2 in Comparator.compare.
aComparator - comparator that knows how to compare target MX variable type (e.g., MXString) to object2 (e.g., Long, MXFloat).
protected void addComparator(java.lang.Class anObject2Klass, com.arsi.mj.variable.VariableComparatorBase aComparator)
Get comparator instance for object2 type.
Parameters:
anObject2Klass - class that defines type of object2 in Comparator.compare.
Returns:
comparator that knows how to compare target MX variable type (e.g., MXString) to object2 (e.g., Long, MXFloat).
public com.arsi.mj.variable.VariableComparatorBase lookupComparator(java.lang.Class anObject2Klass)