public class Imaginary extends Fixed1ArgFunction implements FreeRefFunction
Syntax:
IMAGINARY (Inumber)
Returns the imaginary coefficient of a complex number in x + yi or x + yj text format.
Inumber is a complex number for which you want the imaginary coefficient.
Remarks
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
COMPLEX_NUMBER_PATTERN |
static int |
GROUP1_REAL_SIGN |
static java.lang.String |
GROUP1_REAL_SIGN_REGEX |
static int |
GROUP2_IMAGINARY_INTEGER_OR_DOUBLE |
static java.lang.String |
GROUP2_REAL_INTEGER_OR_DOUBLE_REGEX |
static int |
GROUP3_IMAGINARY_SIGN |
static java.lang.String |
GROUP3_IMAGINARY_SIGN_REGEX |
static int |
GROUP4_IMAGINARY_INTEGER_OR_DOUBLE |
static java.lang.String |
GROUP4_IMAGINARY_INTEGER_OR_DOUBLE_REGEX |
static java.lang.String |
GROUP5_IMAGINARY_GROUP_REGEX |
static FreeRefFunction |
instance |
Constructor and Description |
---|
Imaginary() |
Modifier and Type | Method and Description |
---|---|
ValueEval |
evaluate(int srcRowIndex,
int srcColumnIndex,
ValueEval inumberVE)
|
ValueEval |
evaluate(ValueEval[] args,
OperationEvaluationContext ec) |
evaluate
public static final FreeRefFunction instance
public static final java.lang.String GROUP1_REAL_SIGN_REGEX
public static final java.lang.String GROUP2_REAL_INTEGER_OR_DOUBLE_REGEX
public static final java.lang.String GROUP3_IMAGINARY_SIGN_REGEX
public static final java.lang.String GROUP4_IMAGINARY_INTEGER_OR_DOUBLE_REGEX
public static final java.lang.String GROUP5_IMAGINARY_GROUP_REGEX
public static final java.util.regex.Pattern COMPLEX_NUMBER_PATTERN
public static final int GROUP1_REAL_SIGN
public static final int GROUP2_IMAGINARY_INTEGER_OR_DOUBLE
public static final int GROUP3_IMAGINARY_SIGN
public static final int GROUP4_IMAGINARY_INTEGER_OR_DOUBLE
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval inumberVE)
Function1Arg
evaluate
in interface Function1Arg
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec)
evaluate
in interface FreeRefFunction
args
- the pre-evaluated arguments for this function. args is never null
,
nor are any of its elements.ec
- primarily used to identify the source cell containing the formula being evaluated.
may also be used to dynamically create reference evals.null
. Possibly an instance of ErrorEval in the case of
a specified Excel error (Exceptions are never thrown to represent Excel errors).Copyright 2018 The Apache Software Foundation or its licensors, as applicable.