Class Constant<T>

java.lang.Object
net.andreinc.mockneat.unit.objects.Constant<T>
All Implemented Interfaces:
MockUnit<T>

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

  • Method Details

    • 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>.