Class MaxResolver<T>

  • All Implemented Interfaces:
    ProductsResolver<T,​Void>
    Direct Known Subclasses:
    NullOrMaxResolver

    public class MaxResolver<T>
    extends FromListResolver<T,​T>
    Resolves the maximum value IMPORTANT: When using this resolver for enum properties the enum must be ordered from least to greatest to be consistent when resolving to null because the product accessor implementation assumes it.
    In case the enum implements HasDefault then the value marked as the default will be returned when resolving to null.
    • Constructor Detail

      • MaxResolver

        public MaxResolver()
    • Method Detail

      • toResult

        protected T toResult​(List<T> values)
        Description copied from class: FromListResolver
        Must be implemented to actually transform the given list of all values to the expected result
        Specified by:
        toResult in class FromListResolver<T,​T>