Class DefaultUniquifier

java.lang.Object
org.dellroad.stuff.validation.DefaultUniquifier
All Implemented Interfaces:
Uniquifier<Object>

public class DefaultUniquifier extends Object implements 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 Details

    • DefaultUniquifier

      public DefaultUniquifier()
  • Method Details

    • getUniqued

      public Object getUniqued(Object value)
      Uniquify value.

      The implementation in DefaultUniquifier just returns value.

      Specified by:
      getUniqued in interface Uniquifier<Object>
      Parameters:
      value - the value to be uniquified
      Returns:
      unique representative, or null to except value from the uniqueness requirement