Follow the links below to browse sample Javadoc for MJ classes and tools, including the MJ Runtime Library.
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). |
public interface com.arsi.mj.variable.ICoercedInteger
Methods |
Get the coerced integer length of a numeric variable.
public int coercedIntegerLength()
|
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.
public int getScale()
|
Set scale (number of digits to right of decimal) of this variable.
public void setScale(int aScale)
|
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.
public int compareToIgnoreCase(java.lang.Object anObject)
|
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.
public int compareIgnoreCase(java.lang.Object anObj1, java.lang.Object anObj2)
|
public interface com.arsi.mj.variable.IMathFunctions
Methods |
Absolute value or magnitude of variable.
public java.lang.Number abs(java.util.EnumSet someOptions)
|
Arc cosine of variable in radians.
public java.lang.Number acos(java.util.EnumSet someOptions)
|
Arc sine of variable in radians.
public java.lang.Number asin(java.util.EnumSet someOptions)
|
Arc tangent of variable in radians.
public java.lang.Number atan(java.util.EnumSet someOptions)
|
Cube root of variable.
public java.lang.Number cbrt(java.util.EnumSet someOptions)
|
Cosine of variable in radians.
public java.lang.Number cos(java.util.EnumSet someOptions)
|
Co-tangent of variable in radians.
public java.lang.Number ctn(java.util.EnumSet someOptions)
|
Value of variable (assumed to be radians) expressed in degrees.
public java.lang.Number deg(java.util.EnumSet someOptions)
|
Fractional portion of variable.
public java.lang.Number frac(java.util.EnumSet someOptions)
|
Hyperbolic cosine of variable.
public java.lang.Number hcos(java.util.EnumSet someOptions)
|
Hyperbolic sine of variable.
public java.lang.Number hsin(java.util.EnumSet someOptions)
|
Hyperbolic tangent of variable.
public java.lang.Number htan(java.util.EnumSet someOptions)
|
Integer portion of variable (for backward compatibility with INT()).
public java.lang.Number intf(java.util.EnumSet someOptions)
|
Logarithm of variable in base e.
public java.lang.Number log(java.util.EnumSet someOptions)
|
Logarithm of variable in base 10.
public java.lang.Number log10(java.util.EnumSet someOptions)
|
Modulus; remainder value of variable divided by a decimal.
public java.lang.Number mod(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
|
Modulus; remainder value of variable divided by a double.
public java.lang.Number mod(java.lang.Double aDbl, java.util.EnumSet someOptions)
|
Modulus; remainder value of variable divided by an integer.
public java.lang.Number mod(java.lang.Integer anInt, java.util.EnumSet someOptions)
|
Modulus; remainder value of variable divided by a long integer.
public java.lang.Number mod(java.lang.Long aLong, java.util.EnumSet someOptions)
|
Modulus; remainder value of variable divided by another variable.
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.
public java.lang.Number rad(java.util.EnumSet someOptions)
|
Sine of variable (assumed to be radians).
public java.lang.Number sin(java.util.EnumSet someOptions)
|
Square root of variable.
public java.lang.Number sqrt(java.util.EnumSet someOptions)
|
Tangent of variable (assumed to be radians).
public java.lang.Number tan(java.util.EnumSet someOptions)
|
public interface com.arsi.mj.variable.IMathOperators
Methods |
Add value of this variable to value of decimal.
public java.lang.Number add(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
|
Add value of this variable to value of double.
public java.lang.Number add(java.lang.Double aDbl, java.util.EnumSet someOptions)
|
Add value of this variable to value of integer.
public java.lang.Number add(java.lang.Integer anInt, java.util.EnumSet someOptions)
|
Add value of this variable to value of 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.
public java.lang.Number add(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
|
Decrement value of this variable by value of decimal.
public void decrement(java.math.BigDecimal aDec)
|
Decrement value of this variable by value of double.
public void decrement(java.lang.Double aDbl)
|
Decrement value of this variable by value of integer.
public void decrement(java.lang.Integer anInt)
|
Decrement value of this variable by value of long integer.
public void decrement(java.lang.Long aLong)
|
Decrement value of this variable by value of another variable.
public void decrement(com.arsi.mj.variable.MJVariable aVariable)
|
Divide value of this variable by value of decimal.
public java.lang.Number divide(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
|
Divide value of this variable by value of double.
public java.lang.Number divide(java.lang.Double aDbl, java.util.EnumSet someOptions)
|
Divide value of this variable by value of integer.
public java.lang.Number divide(java.lang.Integer anInt, java.util.EnumSet someOptions)
|
Divide value of this variable by value of long integer.
public java.lang.Number divide(java.lang.Long aLong, java.util.EnumSet someOptions)
|
Divide value of this variable by value of another variable.
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.
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.
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.
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.
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.
public java.lang.Number divideToIntegralValue(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
|
Increment value of this variable by value of decimal.
public void increment(java.math.BigDecimal aDec)
|
Increment value of this variable by value of double.
public void increment(java.lang.Double aDbl)
|
Increment value of this variable by value of integer.
public void increment(java.lang.Integer anInt)
|
Increment value of this variable by value of long integer.
public void increment(java.lang.Long aLong)
|
Increment value of this variable by value of another variable.
public void increment(com.arsi.mj.variable.MJVariable aVariable)
|
Multiply value of this variable by value of decimal.
public java.lang.Number multiply(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
|
Multiply value of this variable by value of double.
public java.lang.Number multiply(java.lang.Double aDbl, java.util.EnumSet someOptions)
|
Multiply value of this variable by value of integer.
public java.lang.Number multiply(java.lang.Integer anInt, java.util.EnumSet someOptions)
|
Multiply value of this variable by value of long integer.
public java.lang.Number multiply(java.lang.Long aLong, java.util.EnumSet someOptions)
|
Multiply value of this variable by value of another variable.
public java.lang.Number multiply(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
|
Negate value of this variable.
public java.lang.Number negate()
|
Raise value of this variable by power of decimal value.
public java.lang.Number pow(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
|
Raise value of this variable by power of double value.
public java.lang.Number pow(java.lang.Double aDbl, java.util.EnumSet someOptions)
|
Raise value of this variable by power of integer value.
public java.lang.Number pow(java.lang.Integer anInt, java.util.EnumSet someOptions)
|
Raise value of this variable by power of long integer value.
public java.lang.Number pow(java.lang.Long aLong, java.util.EnumSet someOptions)
|
Raise value of this variable by power of another variable.
public java.lang.Number pow(com.arsi.mj.variable.MJVariable aVariable, java.util.EnumSet someOptions)
|
Subtract value of decimal from value of this variable.
public java.lang.Number subtract(java.math.BigDecimal aDec, java.util.EnumSet someOptions)
|
Subtract value of double from value of this variable.
public java.lang.Number subtract(java.lang.Double aDbl, java.util.EnumSet someOptions)
|
Subtract value of integer from value of this variable.
public java.lang.Number subtract(java.lang.Integer anInt, java.util.EnumSet someOptions)
|
Subtract value of long integer from value of this variable.
public java.lang.Number subtract(java.lang.Long aLong, java.util.EnumSet someOptions)
|
Subtract value of another variable from value of this variable.
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).
public java.lang.Number toMapperMathNumber()
|
Get value of this variable as operand to mathematical operation.
public java.lang.Number toMathOperand(java.util.EnumSet someOptions)
|
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.
public java.lang.Byte byteValue()
|
Get the raw numeric value held by this variable as decimal, regardless of whether the
variable is valid.
public java.math.BigDecimal decimalValue()
|
Get the raw numeric value held by this variable as a double, regardless of whether the
variable is valid.
public java.lang.Double doubleValue()
|
Get the raw numeric value held by this variable as a float, regardless of whether the
variable is valid.
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.
public java.lang.Integer intValue()
|
Get the raw numeric value held by this variable, regardless of whether the
variable is valid.
public java.lang.Long longValue()
|
Get the raw numeric value held by this variable as short, regardless of whether the
variable is valid.
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.
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.
public java.lang.String toMapperNumericString()
|
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
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 .
public boolean NE(java.lang.String aString, com.arsi.mj.variable.MJVariable.CompareOption anOption)
|
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
|
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.
public com.arsi.mj.text.MJFormatter formatter()
|
Get Mapper type this variable represents.
public com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType getMapperType()
|
Get size (i.e., total width) of this 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.
public boolean isUsingMapperObjectIdentity()
|
Determines if variable represents a valid value.
public boolean isValid()
|
Get the scope (e.g., GLOBAL ) of this variable.
public com.arsi.mj.VariableScope scope()
|
Set Mapper type this variable represents.
public void setMapperType(com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aType)
|
Set whether setSubstring prefers numeric or date types over string 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).
public void setSize(int aSize)
|
Set portion of variable value starting at specified position and
ending after specified number of characters.
public void setSubstring(int aPosition, int aCount, java.lang.String aValue)
|
Set portion of variable value starting at specified position and
ending after specified number of characters.
public void setSubstring(int aPosition, int aCount, java.lang.String aValue, java.util.EnumSet someOptions)
|
Set portion of variable value starting at specified position and
ending after specified number of characters.
public void setSubstring(int aPosition, int aCount, java.lang.String aValue, com.arsi.mj.variable.IVariable.SetSubstrOption anOption)
|
Set validity of variable.
public void setValid(boolean aValidFlag)
|
Establish whether or not variable uses Mapper rules in
public void useMapperObjectIdentity(boolean wantMapperObjectIdentity)
|
public interface com.arsi.mj.variable.IVariableIdentity
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.
public boolean hasVariableName(int aMapperVarnum)
|
Get variable namespace associated with a possibly transformed numbered variable.
public com.arsi.mj.variable.MJVariableNamespace namespace(int aMapperVarnum)
|
Get variable namespace associated with a possibly transformed 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.
public java.lang.String variableName(int aMapperVarnum)
|
Get the Java variable name corresponding to the provided variable name.
public java.lang.String variableName(java.lang.String aMapperVarname)
|
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.
public java.util.Calendar calendar()
|
public int compareTo(java.lang.Object anOtherObj)
|
Get date object as java.util.Date .
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.
public static java.util.Calendar getMapperDateLowerLimit()
|
Obtains the lower bound for date/time data based on a given time zone.
public static java.util.Calendar getMapperDateLowerLimit(java.util.TimeZone aZone)
|
Obtains the lower bound for date/time data based on a given time zone.
public static java.util.Calendar getMapperDateTimeLowerLimit()
|
Obtains the lower bound for date/time data based on a given time zone.
public static java.util.Calendar getMapperDateTimeLowerLimit(java.util.TimeZone aZone)
|
Obtains the upper bound for date/time data based on a given time zone.
public static java.util.Calendar getMapperDateTimeUpperLimit()
|
Obtains the upper bound for date/time data based on a given time zone.
public static java.util.Calendar getMapperDateTimeUpperLimit(java.util.TimeZone aZone)
|
Obtains the upper bound for date/time data based on a given time zone.
public static java.util.Calendar getMapperDateUpperLimit()
|
Obtains the upper bound for date/time data based on a given time zone.
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
public static boolean isValidMapperInterval(double anElapsedHours)
|
Determine if specified quantity of hours is a valid Mapper time interval as
implied by Mapper formats
public static boolean isValidMapperInterval(long anElapsedHours)
|
Determine if specified date is a valid, single-year Mapper date as implied by
Mapper formats
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
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
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 .
public static long mapperDateToHours(java.util.Calendar aCalendar)
|
Convert number of days since start of Mapper-defined epoch to a date.
public static java.util.Calendar mapperDaysToDate(double anOffsetInDays)
|
Convert number of days since start of Mapper-defined epoch to a date.
public static java.util.Calendar mapperDaysToDate(long anOffsetInDays)
|
Create date object by parsing string containing date and/or time in specified format.
public static com.arsi.mj.variable.MJDate parseFromString(java.lang.String aDateStr, org.apache.commons.lang3.time.FastDateFormat aFmt)
|
Create date object by parsing string containing date and/or time in specified format.
public static com.arsi.mj.variable.MJDate parseFromString(java.lang.String aDateStr, java.text.SimpleDateFormat aFmt)
|
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)
|
public void setDate(java.lang.String aDateStr, org.apache.commons.lang3.time.FastDateFormat aFmt, java.util.TimeZone aTZ)
|
public void setDate(java.lang.String aDateStr, java.text.SimpleDateFormat aFmt)
|
public void setDate(java.lang.String aDateStr, java.text.SimpleDateFormat aFmt, java.util.TimeZone aTZ)
|
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)
|
public void setTimeZone(java.util.TimeZone aTZ)
|
public void setValid(boolean aValidFlag)
|
Get date object as java.sql.Date .
public java.sql.Date sqlDate()
|
Get date object as SQL timestamp.
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)
|
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 (
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 aBigDecimal without using Mapper
rules for object identity, this method follows BigDecimal.compareTo semantics
and not BigDecimal.equals .
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.
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)
|
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 .
public java.lang.String toString()
|
Concrete factory for looking up variable comparators for MJDecimal
.
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()
|
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 (
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.
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.
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)
|
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 .
public java.lang.String toString()
|
Concrete factory for looking up variable comparators for MJFloat
.
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()
|
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.
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.
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.
protected boolean wasFractionDropped(java.lang.String anOriginalNumstr, java.lang.String anAdjustedNumstr)
|
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.
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.
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 (
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.
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.
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)
|
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 .
public java.lang.String toString()
|
Concrete factory for looking up variable comparators for MJInteger
.
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()
|
Map
semantics to an encapsulated list. This wrapper allows support of one-
based index semantics in MJ math formulas.
<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.
public MJListWrapper(java.util.List aDelegateList)
|
Methods |
Required implementation.
public void clear()
|
Required implementation.
public boolean containsKey(java.lang.Object key)
|
Required implementation.
public boolean containsValue(java.lang.Object value)
|
Required implementation.
public java.util.Set entrySet()
|
Required implementation.
public com.arsi.mj.variable.MJVariable get(java.lang.Object key)
|
Required implementation.
public boolean isEmpty()
|
Required implementation.
public java.util.Set keySet()
|
Required implementation.
public com.arsi.mj.variable.MJVariable put(java.lang.Integer key, com.arsi.mj.variable.MJVariable value)
|
Required implementation.
public void putAll(java.util.Map populatedMap)
|
Required implementation.
public com.arsi.mj.variable.MJVariable remove(java.lang.Object key)
|
Required implementation.
public int size()
|
Required implementation.
public java.util.Collection values()
|
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.
public static java.lang.Number abs(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Absolute value or magnitude of number.
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.
public static java.lang.Number acos(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Arc cosine of number in radians.
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.
public static java.lang.Number asin(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Arc sine of number in radians.
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.
public static java.lang.Number atan(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Arc tangent of number in radians.
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.
public static java.lang.Number cbrt(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Cube root of number.
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.
public static java.lang.Number cos(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Cosine of number in radians.
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.
public static java.lang.Number ctn(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Co-tangent of number in radians.
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.
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.
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.
public static java.lang.Number frac(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Fractional portion of number.
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.
public static java.lang.Number hcos(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Hyperbolic cosine of number.
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.
public static java.lang.Number hsin(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Hyperbolic sine of number.
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.
public static java.lang.Number htan(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Hyperbolic tangent of number.
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.
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()).
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.
public static java.lang.Number log(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Logarithm of number in base e.
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.
public static java.lang.Number log10(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Logarithm of number in base 10.
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.
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.
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.
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).
public static java.lang.Number sin(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Sine of number (assumed to be radians).
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.
public static java.lang.Number sqrt(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Square root of number.
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).
public static java.lang.Number tan(com.arsi.mj.variable.MJString aNumericStrvar, java.util.EnumSet someOptions)
|
Tangent of number (assumed to be radians).
public static java.lang.Number tan(java.lang.Number aNumber, java.util.EnumSet someOptions)
|
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
|
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.
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 ).
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 ).
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).
protected java.lang.String toFormattedSansNonNumeric()
|
public void useMapperObjectIdentity(boolean wantMapperObjectIdentity)
|
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 .
public final java.lang.String getPreferTypeOverStringValue()
|
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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
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 (
public int compareTo(java.lang.Object anOtherObj)
|
Compare this MJString to a supported operand (
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
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.
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.
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.
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.
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)
|
public void setString(byte someBytes, int anOffset, int aCount)
|
public void setString(byte someBytes, int anOffset, int aCount, java.nio.charset.Charset aCharset)
|
public void setString(byte someBytes, int anOffset, int aCount, java.lang.String aCharsetName)
|
public void setString(byte someBytes, java.lang.String aCharsetName)
|
public void setString(char someChars)
|
public void setString(char someChars, int anOffset, int aCount)
|
public void setString(java.util.EnumSet someOptions, byte someBytes)
|
public void setString(java.util.EnumSet someOptions, byte someBytes, java.nio.charset.Charset aCharset)
|
public void setString(java.util.EnumSet someOptions, byte someBytes, int anOffset, int aCount)
|
public void setString(java.util.EnumSet someOptions, byte someBytes, int anOffset, int aCount, java.nio.charset.Charset aCharset)
|
public void setString(java.util.EnumSet someOptions, byte someBytes, int anOffset, int aCount, java.lang.String aCharsetName)
|
public void setString(java.util.EnumSet someOptions, byte someBytes, java.lang.String aCharsetName)
|
public void setString(java.util.EnumSet someOptions, char someChars)
|
public void setString(java.util.EnumSet someOptions, char someChars, int anOffset, int aCount)
|
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)
|
public void setValid(boolean aValidFlag)
|
public java.lang.CharSequence subSequence(int aStart, int anEnd)
|
public java.lang.String toString()
|
public void useAlphaCompare(boolean wantAlphaCompare)
|
Concrete factory for looking up variable comparators for MJString
.
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()
|
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.
public static java.util.List countFromOneListProxy(java.util.List aList)
|
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
|
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
|
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
|
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.
public static java.lang.String adjustString(java.lang.String aString, int aMaximumLength, java.util.EnumSet someOptions)
|
Verify that required MathOption s are present in a set of such options.
public static void checkIllegalMathOptionArgument(java.util.EnumSet someOptions, java.lang.Class aClassOfExpectedResult)
|
Get default MathOption s to use for mathematical operations on MJ
variables if explicit math options not specified.
public static java.util.EnumSet defaultMathOptions()
|
Determine if java.lang.ArithmeticException is thrown immediately.
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.
public void setOptionsForSetSubstr(java.util.EnumSet someOptions)
|
public void setSubstring(int aPosition, int aCount, java.lang.String aValue)
|
Derived, concrete variable classes must provide an implementation.
public abstract void setSubstring(int aPosition, int aCount, java.lang.String aValue, java.util.EnumSet someOptions)
|
public void setSubstring(int aPosition, int aCount, java.lang.String aValue, com.arsi.mj.variable.IVariable.SetSubstrOption anOption)
|
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.
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.
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.
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.
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.
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.
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.
protected void validateVariableSizeByType(com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVartype, int aVarsize, int aVarscale)
|
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.
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.
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)
|
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
|
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.
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
|
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.
public MJVariableNamespace(com.arsi.mj.VariableScope aScope)
|
Methods |
Add numbered array of variables to this variable namespace.
public void addArray(int aVarnum, java.util.List anArray)
|
Add aliased array of variables to this variable namespace.
public void addArray(int aVarnum, java.lang.String aVarname, java.util.List anArray)
|
Add named array of variables to this variable namespace.
public void addArray(java.lang.String aVarname, java.util.List anArray)
|
Add aliased variable (has both number and name) to this variable namespace.
public void addVariable(com.arsi.mj.variable.aliased.IAliasedVariable aVariable)
|
Add named variable to this variable namespace.
public void addVariable(com.arsi.mj.variable.named.INamedVariable aVariable)
|
Add numbered variable to this variable namespace.
public void addVariable(com.arsi.mj.variable.numbered.INumberedVariable aVariable)
|
Iterate over arrays in namespace.
public java.util.Iterator arrayIterator()
|
Lookup numbered array.
public final java.util.List lookupArray(int aVarnum)
|
Lookup named and typed array.
public final java.util.List lookupArray(int aVarnum, java.lang.Class aKlass)
|
Lookup named array.
public final java.util.List lookupArray(java.lang.String aVarname)
|
Lookup named and typed array.
public final java.util.List lookupArray(java.lang.String aVarname, java.lang.Class aKlass)
|
Lookup numbered integer variable.
public com.arsi.mj.variable.numbered.MJNumberedInteger lookupInteger(int aVarnum)
|
Lookup named integer variable.
public com.arsi.mj.variable.named.MJNamedInteger lookupInteger(java.lang.String aVarname)
|
Lookup numbered variable.
public com.arsi.mj.variable.MJVariable lookupVariable(int aVarnum)
|
Lookup numbered and typed variable.
public com.arsi.mj.variable.MJVariable lookupVariable(int aVarnum, java.lang.Class aKlass)
|
Lookup named variable.
public com.arsi.mj.variable.MJVariable lookupVariable(java.lang.String aVarname)
|
Lookup named and typed variable.
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.
public final com.arsi.mj.VariableScope scope()
|
Iterate over variables in namespace.
public java.util.Iterator variableIterator()
|
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)
|
public void setValid(boolean aValidFlag)
|
public void useMapperObjectIdentity(boolean wantMapperObjectIdentity)
|
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.<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).
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
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()
|
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).
<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.
protected void addComparator(java.lang.Class anObject2Klass, com.arsi.mj.variable.VariableComparatorBase aComparator)
|
Get comparator instance for object2 type.
public com.arsi.mj.variable.VariableComparatorBase lookupComparator(java.lang.Class anObject2Klass)
|