public class IgnoreCaseEnumerationConstraint extends EnumerationConstraint.Default<String>
EnumerationConstraint
implementation based
on static set of case insensitive strings.IgnoreCaseEnumeration
,
ConstraintFactory.ignoreCaseEnumeration(String...)
,
ConstraintFactory.ignoreCaseEnumeration(Collection)
EnumerationConstraint.Default<V>
constants, type
Modifier | Constructor and Description |
---|---|
protected |
IgnoreCaseEnumerationConstraint(Collection<String> constants)
Constructs a new
IgnoreCaseEnumerationConstraint with the
specified collection of allowed strings. |
protected |
IgnoreCaseEnumerationConstraint(IgnoreCaseEnumeration annotation)
Constructs a new
IgnoreCaseEnumerationConstraint from the
specified annotation. |
protected |
IgnoreCaseEnumerationConstraint(String... constants)
Constructs a new
IgnoreCaseEnumerationConstraint with the
specified array of allowed strings. |
Modifier and Type | Method and Description |
---|---|
static Set<String> |
toIgnoreCaseSet(Collection<String> constants)
Returns case insensitive set of strings from the specified collection of
strings.
|
static Set<String> |
toIgnoreCaseSet(String... constants)
Returns case insensitive set of strings from the specified array of
strings.
|
getConstants, getType
appendMessageArguments, check, getSortedConstants
validate
getMessageTemplate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMessageTemplate
protected IgnoreCaseEnumerationConstraint(String... constants)
IgnoreCaseEnumerationConstraint
with the
specified array of allowed strings.constants
- Array of allowed strings.IllegalArgumentException
- if the specified array of allowed
strings is null
or empty or contains
null
elements.protected IgnoreCaseEnumerationConstraint(Collection<String> constants)
IgnoreCaseEnumerationConstraint
with the
specified collection of allowed strings.constants
- Collection of allowed strings.IllegalArgumentException
- if the specified collection of allowed
strings is null
or empty or contains
null
elements.protected IgnoreCaseEnumerationConstraint(IgnoreCaseEnumeration annotation)
IgnoreCaseEnumerationConstraint
from the
specified annotation.annotation
- Constraint annotation.IllegalArgumentException
- if the specified annotation defines
empty set of allowed strings.public static Set<String> toIgnoreCaseSet(String... constants)
constants
- Array of strings.public static Set<String> toIgnoreCaseSet(Collection<String> constants)
constants
- Collection of strings.Copyright © 2011–2020 FoxLabs. All rights reserved.