Top Description Fields Constructors Methods
javax.money.format

public Class MonetaryParseException

extends MonetaryException
Class Inheritance
Imports
java.util.Objects, javax.money.MonetaryException

Signals that an error has been reached unexpectedly while parsing.
Author
Werner Keil

Field Summary

Modifier and TypeField and Description
private CharSequence
data

The original input data.

private int
errorIndex

The zero-based character offset into the string being parsed at which the error was found during parsing.

private static final long

Constructor Summary

AccessConstructor and Description
public
MonetaryParseException(String
the detail message
message
,
CharSequence
the parsed text, should not be null
parsedData
,
int
the position where the error is found while parsing.
errorIndex
)

Constructs a MonetaryParseException with the specified detail message, parsed text and index.

public
MonetaryParseException(CharSequence
the parsed text, should not be null
parsedData
,
int
the position where the error is found while parsing.
errorIndex
)

Constructs a MonetaryParseException with the parsed text and offset.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the index where the error was found
getErrorIndex
()

Returns the index where the error was found.

public String

Returns:

the parsed input string, or null, if null was passed as input.
getInput
()

Returns the string that was being parsed.

Field Detail

databack to summary
private CharSequence data

The original input data.

errorIndexback to summary
private int errorIndex

The zero-based character offset into the string being parsed at which the error was found during parsing.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.money.MonetaryException.serialVersionUID.

serialVersionUID.

Constructor Detail

MonetaryParseExceptionback to summary
public MonetaryParseException(String message, CharSequence parsedData, int errorIndex)

Constructs a MonetaryParseException with the specified detail message, parsed text and index. A detail message is a String that describes this particular exception.

Parameters
message:String

the detail message

parsedData:CharSequence

the parsed text, should not be null

errorIndex:int

the position where the error is found while parsing.

MonetaryParseExceptionback to summary
public MonetaryParseException(CharSequence parsedData, int errorIndex)

Constructs a MonetaryParseException with the parsed text and offset. A detail message is a String that describes this particular exception.

Parameters
parsedData:CharSequence

the parsed text, should not be null

errorIndex:int

the position where the error is found while parsing.

Method Detail

getErrorIndexback to summary
public int getErrorIndex()

Returns the index where the error was found.

Returns:int

the index where the error was found

getInputback to summary
public String getInput()

Returns the string that was being parsed.

Returns:String

the parsed input string, or null, if null was passed as input.