public class MutuallyExclusiveConfigurationPropertiesException extends RuntimeException
Constructor and Description |
---|
MutuallyExclusiveConfigurationPropertiesException(Collection<String> configuredNames,
Collection<String> mutuallyExclusiveNames)
Creates a new instance for mutually exclusive configuration properties when two or
more of those properties have been configured.
|
Modifier and Type | Method and Description |
---|---|
Set<String> |
getConfiguredNames()
Return the names of the properties that have been configured.
|
Set<String> |
getMutuallyExclusiveNames()
Return the names of the properties that are mutually exclusive.
|
static void |
throwIfMultipleNonNullValuesIn(Consumer<Map<String,Object>> entries)
Throw a new
MutuallyExclusiveConfigurationPropertiesException if multiple
non-null values are defined in a set of entries. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public MutuallyExclusiveConfigurationPropertiesException(Collection<String> configuredNames, Collection<String> mutuallyExclusiveNames)
configuredNames
- the names of the properties that have been configuredmutuallyExclusiveNames
- the names of the properties that are mutually
exclusivepublic Set<String> getConfiguredNames()
public Set<String> getMutuallyExclusiveNames()
public static void throwIfMultipleNonNullValuesIn(Consumer<Map<String,Object>> entries)
MutuallyExclusiveConfigurationPropertiesException
if multiple
non-null values are defined in a set of entries.entries
- a consumer used to populate the entries to check