Class ConverterCollections.ConverterHolder<F,​T>

  • Type Parameters:
    F - the type of the element the Holder holds
    T - the type that the element should be converted to
    All Implemented Interfaces:
    Holder<T>, Serializable
    Enclosing class:
    ConverterCollections

    public static class ConverterCollections.ConverterHolder<F,​T>
    extends Object
    implements Holder<T>, Serializable
    A Holder that converts the element before returning them.
    See Also:
    Serialized Form
    • Constructor Detail

      • ConverterHolder

        public ConverterHolder​(F value,
                               Converter<F,​T> convUp)
        Constructor.
        Parameters:
        value - the value to wrap
        convUp - the converter to use
    • Method Detail

      • get

        public T get()
        Description copied from interface: Holder
        Return the held object.
        Specified by:
        get in interface Holder<F>
        Returns:
        the held object
      • set

        public void set​(T value)
        Description copied from interface: Holder
        Specify the held object.
        Specified by:
        set in interface Holder<F>
        Parameters:
        value - the object to hold
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object