Top Description Fields Constructors Methods
org.apache.commons.math3.exception

public Class MultiDimensionMismatchException

extends MathIllegalArgumentException
Class Inheritance
Known Direct Subclasses
org.apache.commons.math3.linear.MatrixDimensionMismatchException
Imports
org.apache.commons.math3.exception.util.Localizable, .LocalizedFormats

Exception to be thrown when two sets of dimensions differ.
Since
3.0

Field Summary

Modifier and TypeField and Description
private final Integer[]
expected

Correct dimensions.

private static final long
private final Integer[]
wrong

Wrong dimensions.

Constructor Summary

AccessConstructor and Description
public
MultiDimensionMismatchException(Integer[]
Wrong dimensions.
wrong
,
Integer[]
Expected dimensions.
expected
)

Construct an exception from the mismatched dimensions.

public
MultiDimensionMismatchException(Localizable
Message pattern providing the specific context of the error.
specific
,
Integer[]
Wrong dimensions.
wrong
,
Integer[]
Expected dimensions.
expected
)

Construct an exception from the mismatched dimensions.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the expected dimension stored at index.
getExpectedDimension
(int
Dimension index.
index
)

public Integer[]

Returns:

an array containing the expected dimensions.
getExpectedDimensions
()

public int

Returns:

the wrong dimension stored at index.
getWrongDimension
(int
Dimension index.
index
)

public Integer[]

Returns:

an array containing the wrong dimensions.
getWrongDimensions
()

Inherited from org.apache.commons.math3.exception.MathIllegalArgumentException:
getContextgetLocalizedMessagegetMessage

Field Detail

expectedback to summary
private final Integer[] expected

Correct dimensions.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.apache.commons.math3.exception.MathIllegalArgumentException.serialVersionUID.

Serializable version Id.

wrongback to summary
private final Integer[] wrong

Wrong dimensions.

Constructor Detail

MultiDimensionMismatchExceptionback to summary
public MultiDimensionMismatchException(Integer[] wrong, Integer[] expected)

Construct an exception from the mismatched dimensions.

Parameters
wrong:Integer[]

Wrong dimensions.

expected:Integer[]

Expected dimensions.

MultiDimensionMismatchExceptionback to summary
public MultiDimensionMismatchException(Localizable specific, Integer[] wrong, Integer[] expected)

Construct an exception from the mismatched dimensions.

Parameters
specific:Localizable

Message pattern providing the specific context of the error.

wrong:Integer[]

Wrong dimensions.

expected:Integer[]

Expected dimensions.

Method Detail

getExpectedDimensionback to summary
public int getExpectedDimension(int index)
Parameters
index:int

Dimension index.

Returns:int

the expected dimension stored at index.

getExpectedDimensionsback to summary
public Integer[] getExpectedDimensions()
Returns:Integer[]

an array containing the expected dimensions.

getWrongDimensionback to summary
public int getWrongDimension(int index)
Parameters
index:int

Dimension index.

Returns:int

the wrong dimension stored at index.

getWrongDimensionsback to summary
public Integer[] getWrongDimensions()
Returns:Integer[]

an array containing the wrong dimensions.