Class MultiDimensionMismatchException

All Implemented Interfaces:
Serializable, ExceptionContextProvider
Direct Known Subclasses:
MatrixDimensionMismatchException

public class MultiDimensionMismatchException extends MathIllegalArgumentException
Exception to be thrown when two sets of dimensions differ.
Since:
3.0
See Also:
  • Constructor Details

    • MultiDimensionMismatchException

      public MultiDimensionMismatchException(Integer[] wrong, Integer[] expected)
      Construct an exception from the mismatched dimensions.
      Parameters:
      wrong - Wrong dimensions.
      expected - Expected dimensions.
    • MultiDimensionMismatchException

      public MultiDimensionMismatchException(Localizable specific, Integer[] wrong, Integer[] expected)
      Construct an exception from the mismatched dimensions.
      Parameters:
      specific - Message pattern providing the specific context of the error.
      wrong - Wrong dimensions.
      expected - Expected dimensions.
  • Method Details

    • getWrongDimensions

      public Integer[] getWrongDimensions()
      Returns:
      an array containing the wrong dimensions.
    • getExpectedDimensions

      public Integer[] getExpectedDimensions()
      Returns:
      an array containing the expected dimensions.
    • getWrongDimension

      public int getWrongDimension(int index)
      Parameters:
      index - Dimension index.
      Returns:
      the wrong dimension stored at index.
    • getExpectedDimension

      public int getExpectedDimension(int index)
      Parameters:
      index - Dimension index.
      Returns:
      the expected dimension stored at index.