de.uni_tuebingen.sfb.lichtenstein.exceptions
Class FunctionArgumentsMismatchException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by de.uni_tuebingen.sfb.lichtenstein.exceptions.FunctionArgumentsMismatchException
All Implemented Interfaces:
Serializable

public class FunctionArgumentsMismatchException
extends Exception

An exception class for signalling the mismatch of the arguments to a function. For example, because the number of arguments is incorrect.

Author:
Hendrik Maryns
See Also:
Serialized Form

Constructor Summary
FunctionArgumentsMismatchException(Formula formula, Variable variable)
          Initialize a new FunctionArgumentsMismatchException with a formula and a variable, indicating the formala does not contain the variable.
FunctionArgumentsMismatchException(Variable[] array1, Variable[] array2)
          Initialize a new FunctionArgumentsMismatchException with two arrays of variables, indicating the arrays do not have the same length.
FunctionArgumentsMismatchException(Variable variable1, Variable variable2)
          Initialize a new FunctionArgumentsMismatchException with two variables, indicating the variables are not of the same type.
 
Method Summary
 List<Object> getArguments()
          Returns the arguments.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FunctionArgumentsMismatchException

public FunctionArgumentsMismatchException(Variable[] array1,
                                          Variable[] array2)
Initialize a new FunctionArgumentsMismatchException with two arrays of variables, indicating the arrays do not have the same length.

Parameters:
array1 - The first array.
array2 - The second array.
Postconditions:
  • All elements in the first array are stored in the first part of the offending arguments. | new.getArguments().containsAll(Arrays.asList(array1))
  • All elements in the second array are stored in the second part of the offending arguments. | new.getArguments().containsAll(Arrays.asList(array2))

  • FunctionArgumentsMismatchException

    public FunctionArgumentsMismatchException(Variable variable1,
                                              Variable variable2)
    Initialize a new FunctionArgumentsMismatchException with two variables, indicating the variables are not of the same type.

    Parameters:
    variable1 - The first variable.
    variable2 - The second variable.
    Postcondition:
    Both variables are stored in the offending argument list. | getArguments().contains(variable1) && | getArguments().contains(variable2)

    FunctionArgumentsMismatchException

    public FunctionArgumentsMismatchException(Formula formula,
                                              Variable variable)
    Initialize a new FunctionArgumentsMismatchException with a formula and a variable, indicating the formala does not contain the variable.

    Parameters:
    formula - The formula.
    variable - The variable.
    Postcondition:
    The formula and the variable are stored in the offending argument list. | getArguments().contains(formula) && | getArguments().contains(variable)
    Method Detail

    getArguments

    public List<Object> getArguments()
    Returns the arguments.



    © Copyright 2008 Hendrik Maryns   Creative Commons License