Package org.dellroad.stuff.validation
Class DefaultUniquifier
java.lang.Object
org.dellroad.stuff.validation.DefaultUniquifier
- All Implemented Interfaces:
Uniquifier<Object>
Default uniquifier for
@Unique
constraints.
This class assumes all non-null values are already uniquified and so just returns its argument from getUniqued(java.lang.Object)
.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
DefaultUniquifier
public DefaultUniquifier()
-
-
Method Details
-
getUniqued
Uniquify value.The implementation in
DefaultUniquifier
just returnsvalue
.- Specified by:
getUniqued
in interfaceUniquifier<Object>
- Parameters:
value
- the value to be uniquified- Returns:
- unique representative, or
null
to exceptvalue
from the uniqueness requirement
-