Class ValueProvider<T>

  • Type Parameters:
    T - type of value this provider provides
    All Implemented Interfaces:
    Supplier<T>

    public class ValueProvider<T>
    extends Object
    implements Supplier<T>
    Provider that always provides the specified value.
    Author:
    igor.vaynberg
    • Constructor Detail

      • ValueProvider

        public ValueProvider​(T value)
        Construct.
        Parameters:
        value - value to provide
    • Method Detail

      • of

        public static <T> ValueProvider<T> of​(T value)
        Creates a provider for the specified value
        Type Parameters:
        T - type of value
        Parameters:
        value - value
        Returns:
        provider