Top Description Fields Constructors Methods
org.apache.poi.ss.formula.functions

public Class Roman

extends Fixed2ArgFunction
Class Inheritance
Imports
org.apache.poi.ss.formula.eval.ErrorEval, .EvaluationException, .OperandResolver, .StringEval, .ValueEval

Implementation for Excel Roman() function.

Syntax:
Roman (number,form)

Converts an arabic numeral to roman, as text.

Number Required. The Arabic numeral you want converted.

Form Optional. A number specifying the type of roman numeral you want. The roman numeral style ranges from Classic to Simplified, becoming more concise as the value of form increases.

Return_type a roman numeral, as text

Field Summary

Modifier and TypeField and Description
private static final String[][]
private static final String[]
private static final int[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ValueEval
private String
integerToRoman(int
the number
number
)

Classic conversion.

public String
makeConcise(final String
the input string
input
,
final int
the level of conciseness [0..4] with 4 being most concise and simplified
form
)

Use conversion rule to factor some parts and make them more concise

Inherited from org.apache.poi.ss.formula.functions.Fixed2ArgFunction:
evaluate

Field Detail

REPLACEMENTSback to summary
private static final String[][] REPLACEMENTS
ROMANback to summary
private static final String[] ROMAN
VALUESback to summary
private static final int[] VALUES

Constructor Detail

Romanback to summary
public Roman()

Method Detail

evaluateback to summary
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval numberVE, ValueEval formVE)

Implements org.apache.poi.ss.formula.functions.Function2Arg.evaluate.

Doc from org.apache.poi.ss.formula.functions.Function2Arg.evaluate.

see Function#evaluate(ValueEval[], int, int)

Annotations
@Override
integerToRomanback to summary
private String integerToRoman(int number)

Classic conversion.

Parameters
number:int

the number

makeConciseback to summary
public String makeConcise(final String input, final int form)

Use conversion rule to factor some parts and make them more concise

Parameters
input:String

the input string

form:int

the level of conciseness [0..4] with 4 being most concise and simplified