Class Providers.ConstantProvider<T>

  • All Implemented Interfaces:
    Provider<T>, javax.inject.Provider<T>
    Enclosing class:
    Providers

    private static final class Providers.ConstantProvider<T>
    extends java.lang.Object
    implements Provider<T>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private T instance  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ConstantProvider​(T instance)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      T get()
      Provides an instance of T.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • instance

        private final T instance
    • Constructor Detail

      • ConstantProvider

        private ConstantProvider​(T instance)
    • Method Detail

      • get

        public T get()
        Description copied from interface: Provider
        Provides an instance of T.
        Specified by:
        get in interface Provider<T>
        Specified by:
        get in interface javax.inject.Provider<T>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

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

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