java.lang.Object | |
↳ | com.atlassian.bitbucket.util.CustomPreconditions |
More precondition checks following the same pattern as Guava's Preconditions
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Checks whether
value validates as an optional string. | |||||||||||
Checks whether
value validates as a required string. | |||||||||||
Checks whether
value validates as a required string. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Checks whether value
validates as an optional string. This method duplicates the logic of
the OptionalString
annotation and exists only to
support cases where annotations cannot be used.
value | the value to check |
---|---|
maxLength | the maximum allowed string length |
IllegalArgumentException | if value trims to the empty string or longer than maxLength
characters. null is allowed.
|
---|
Checks whether value
validates as a required string. This method duplicates the logic of
the RequiredString
annotation and exists only to
support cases where annotations cannot be used.
value | the value to check |
---|
IllegalArgumentException | if value is blank
|
---|
Checks whether value
validates as a required string. This method duplicates the logic of
the RequiredString
annotation and exists only to
support cases where annotations cannot be used.
value | the value to check |
---|---|
maxLength | the maximum allowed string length |
IllegalArgumentException | if value is blank or longer than maxLength characters
|
---|