Interface AutoConvertingMap.Converter<T>

  • Type Parameters:
    T -
    Enclosing class:

    public static interface AutoConvertingMap.Converter<T>
    Converter to convert from some other type to the expected type.
    • Method Detail

      • convert

        Optional<T> convert​(Object o)
        If the object is a type we support but not the expected type this should take care of converting that. e.g. if we want to work with Integer on our map but our map expects Strings then if the type is a Integer then we would return a String
        o -
        optional empty if it is a type we don't expect to convert, otherwise if we convert the type then an optional holding its new value, when a non empty optional is returned a warning is logged.
      • getKeyType

        Class<T> getKeyType()