Class ConvertibleValuesMap<V>

    • Field Detail

      • map

        protected final java.util.Map<? extends java.lang.CharSequence,​V> map
    • Constructor Detail

      • ConvertibleValuesMap

        public ConvertibleValuesMap()
        Constructor.
      • ConvertibleValuesMap

        public ConvertibleValuesMap​(java.util.Map<? extends java.lang.CharSequence,​V> map)
        Constructor.
        Parameters:
        map - map of values.
      • ConvertibleValuesMap

        public ConvertibleValuesMap​(java.util.Map<? extends java.lang.CharSequence,​V> map,
                                    ConversionService<?> conversionService)
        Constructor.
        Parameters:
        map - map of values.
        conversionService - conversionService
    • Method Detail

      • getValue

        @Nullable
        public V getValue​(java.lang.CharSequence name)
        Description copied from interface: ConvertibleValues
        Get a raw value without any conversion.
        Specified by:
        getValue in interface ConvertibleValues<V>
        Parameters:
        name - The key name
        Returns:
        True if it is
      • contains

        public boolean contains​(java.lang.String name)
        Description copied from interface: ConvertibleValues
        Whether the given key is contained within these values.
        Specified by:
        contains in interface ConvertibleValues<V>
        Parameters:
        name - The key name
        Returns:
        True if it is
      • get

        public <T> java.util.Optional<T> get​(java.lang.CharSequence name,
                                             ArgumentConversionContext<T> conversionContext)
        Description copied from interface: ValueResolver
        Resolve the given property for the given name.
        Specified by:
        get in interface ValueResolver<V>
        Type Parameters:
        T - The concrete type
        Parameters:
        name - The name
        conversionContext - The conversion context
        Returns:
        An optional containing the property value if it exists and is able to be converted
      • names

        public java.util.Set<java.lang.String> names()
        Specified by:
        names in interface ConvertibleValues<V>
        Returns:
        The names of the values
      • values

        public java.util.Collection<V> values()
        Specified by:
        values in interface ConvertibleValues<V>
        Returns:
        The values
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object