Class NullProvider<T>

  • Type Parameters:
    T -
    All Implemented Interfaces:
    java.util.function.Supplier<T>

    public class NullProvider<T>
    extends java.lang.Object
    implements java.util.function.Supplier<T>
    Provider that provides nulls. Convenient to have to avoid a double null check for the provider and its provided instance.
    Author:
    igor.vaynberg
    • Constructor Summary

      Constructors 
      Constructor Description
      NullProvider()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T get()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NullProvider

        public NullProvider()
    • Method Detail

      • get

        public T get()
        Specified by:
        get in interface java.util.function.Supplier<T>