Object
Throwable
Exception
RuntimeException
IllegalStateException
InvalidParameterCardinalityException
- All Implemented Interfaces:
Serializable
Thrown if adding or removing a parameter value in a
group would result in more or less parameters than the expected range.
The minimum and maximum occurrences are defined by the
ParameterDescriptorGroup
instance associated with the ParameterValueGroup
.
This exception may be thrown directly by the ParameterValueGroup.addGroup(String)
method, or indirectly during the add or remove operations applied on the list returned by
ParameterValueGroup.values()
.
Note 1:
the cardinality is the number of elements in a set. Contrast with multiplicity,
which is the range of possible cardinalities a set can hold.
Note 2:
this exception is of kind
IllegalStateException
instead of IllegalArgumentException
because it is not caused by a bad argument. It is rather a consequence of an ParameterValueGroup
being "full".- Since:
- 2.0
- See Also:
-
Constructor Summary
ConstructorDescriptionInvalidParameterCardinalityException
(String message, String parameterName) Creates an exception with the specified message and parameter name.InvalidParameterCardinalityException
(String message, Throwable cause, String parameterName) Creates an exception with the specified message, cause and parameter name. -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the parameter with invalid cardinality.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidParameterCardinalityException
Creates an exception with the specified message and parameter name.- Parameters:
message
- the detail message, saved for later retrieval by theThrowable.getMessage()
method.parameterName
- the name of the parameter with invalid cardinality.
-
InvalidParameterCardinalityException
Creates an exception with the specified message, cause and parameter name.- Parameters:
message
- the detail message, saved for later retrieval by theThrowable.getMessage()
method.cause
- the cause, saved for later retrieval by theThrowable.getCause()
method.parameterName
- the name of the parameter with invalid cardinality.- Since:
- 3.1
-
-
Method Details
-
getParameterName
Returns the name of the parameter with invalid cardinality.- Returns:
- the name of the parameter with invalid cardinality.
-