Class Constant<T>

  • All Implemented Interfaces:
    MockUnit<T>

    public class Constant<T>
    extends java.lang.Object
    implements MockUnit<T>
    • Constructor Detail

      • Constant

        public Constant​(T object)
    • Method Detail

      • constant

        public static <T> Constant<T> constant​(T object)

        Returns a new Constant object.

        This method is a MockUnit<T> used to generate constant values

        Type Parameters:
        T - The type of the object
        Parameters:
        object - The constant object to return
        Returns:
        The constant object to return
      • supplier

        public java.util.function.Supplier<T> supplier()
        Description copied from interface: MockUnit
        This is the sole abstract method of the interface. Needs to be implemented every-time a MockUnit is implemented.
        Specified by:
        supplier in interface MockUnit<T>
        Returns:
        A Supplier<T>.