Top Description Inners Methods
org.hibernate.validator.constraints

public @Interface CodePointLength

extends Annotation
Annotations
@Documented
@Constraint
validatedBy:
@Target:METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE
@Retention:RUNTIME
@Repeatable:List
Static Imports
java.lang.annotation.ElementType.ANNOTATION_TYPE, .ElementType.CONSTRUCTOR, .ElementType.FIELD, .ElementType.METHOD, .ElementType.PARAMETER, .ElementType.TYPE_USE, .RetentionPolicy.RUNTIME

Validate that the code point length of a character sequence is between min and max included.

It is possible to validate a normalized value by setting the normalization strategy.

Author
Kazuki Shimizu
Version
6.0.3

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static @interface
CodePointLength.List

Defines several @CodePointLength annotations on the same element.

public static enum
CodePointLength.NormalizationStrategy

Strategy for normalization.

Method Summary

Modifier and TypeMethod and Description
public Class<?>[]
public int
max()

public String
public int
min()

public CodePointLength.NormalizationStrategy
public Class<? extends Payload>[]
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

groupsback to summary
public Class<?>[] groups()
maxback to summary
public int max()
messageback to summary
public String message()
minback to summary
public int min()
normalizationStrategyback to summary
public CodePointLength.NormalizationStrategy normalizationStrategy()
payloadback to summary
public Class<? extends Payload>[] payload()
org.hibernate.validator.constraints back to summary

public @Interface CodePointLength.List

extends Annotation
Annotations
@Target:METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE
@Retention:RUNTIME
@Documented

Defines several @CodePointLength annotations on the same element.

Method Summary

Modifier and TypeMethod and Description
public CodePointLength[]
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public CodePointLength[] value()
org.hibernate.validator.constraints back to summary

public final Enum CodePointLength.NormalizationStrategy

extends Enum<CodePointLength.NormalizationStrategy>
Class Inheritance

Strategy for normalization.
See Also
Normalizer, Normalizer.Form

Field Summary

Modifier and TypeField and Description
private final Normalizer.Form
public static final CodePointLength.NormalizationStrategy
NFC

Normalization by canonical decomposition, followed by canonical composition.

public static final CodePointLength.NormalizationStrategy
NFD

Normalization by canonical decomposition.

public static final CodePointLength.NormalizationStrategy
NFKC

Normalization by compatibility decomposition, followed by canonical composition.

public static final CodePointLength.NormalizationStrategy
NFKD

Normalization by compatibility decomposition.

public static final CodePointLength.NormalizationStrategy
NONE

No normalization.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public CharSequence

Returns:

normalized value
normalize
(CharSequence
target value
value
)

Normalize a specified character sequence.

public static CodePointLength.NormalizationStrategy
public static CodePointLength.NormalizationStrategy[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

formback to summary
private final Normalizer.Form form
NFCback to summary
public static final CodePointLength.NormalizationStrategy NFC

Normalization by canonical decomposition, followed by canonical composition.

NFDback to summary
public static final CodePointLength.NormalizationStrategy NFD

Normalization by canonical decomposition.

NFKCback to summary
public static final CodePointLength.NormalizationStrategy NFKC

Normalization by compatibility decomposition, followed by canonical composition.

NFKDback to summary
public static final CodePointLength.NormalizationStrategy NFKD

Normalization by compatibility decomposition.

NONEback to summary
public static final CodePointLength.NormalizationStrategy NONE

No normalization.

Constructor Detail

NormalizationStrategyback to summary
private NormalizationStrategy(Normalizer.Form form)

Method Detail

normalizeback to summary
public CharSequence normalize(CharSequence value)

Normalize a specified character sequence.

Parameters
value:CharSequence

target value

Returns:CharSequence

normalized value

valueOfback to summary
public static CodePointLength.NormalizationStrategy valueOf(String name)
valuesback to summary
public static CodePointLength.NormalizationStrategy[] values()