Package com.uc4.api
Class InvalidUC4NameException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.uc4.api.InvalidUC4NameException
- All Implemented Interfaces:
Serializable
This runtime exception is thrown if the name of an object is invalid.
The
getInvalidName()
method returns and the
invalid name.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidUC4NameException
(String invalidName) Constructs anInvalidUC4NameException
using the specified name.InvalidUC4NameException
(String invalidName, String allowedCharacters, int maxLength) Constructs anInvalidUC4NameException
using the specified name. -
Method Summary
Modifier and TypeMethodDescriptionReturns the allowed characters.Returns the invalid name.int
Returns the maximal allowed length of the name or zero if no restriction is set.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidUC4NameException
Constructs anInvalidUC4NameException
using the specified name.- Parameters:
invalidName
- name
-
InvalidUC4NameException
Constructs anInvalidUC4NameException
using the specified name.- Parameters:
invalidName
- nameallowedCharacters
- allowed characters, use empty string if all characters are allowedmaxLength
- maximal allowed length, use 0 if no length restriction is given
-
-
Method Details
-
getMessage
- Overrides:
getMessage
in classThrowable
-
getInvalidName
Returns the invalid name.- Returns:
- name
-
getAllowedCharacters
Returns the allowed characters. Empty if no restriction is set.- Returns:
- allowed characters
-
getMaxLength
public int getMaxLength()Returns the maximal allowed length of the name or zero if no restriction is set.- Returns:
- length
-