Class Months

    • Constructor Detail

      • Months

        public Months​(MockNeat mockNeat)
    • Method Detail

      • months

        public static Months months()

        Returns a Months object that can be used to generate arbitrary Month objects.

        Returns:
        A re-usable Months object. The Months class implements MockUnitMonth.
      • supplier

        public java.util.function.Supplier<java.time.Month> 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<java.time.Month>
        Returns:
        A Supplier<T>.
      • rangeClosed

        public MockUnitMonth rangeClosed​(java.time.Month lower,
                                         java.time.Month upper)

        Returns a new MockUnitMonth that can be used to generate Month objects in the given range: [lower, upper].

        Parameters:
        lower - The lower bound of the interval.
        upper - The upper bound of the interval.
        Returns:
        A new MockUnitMonth
      • range

        public MockUnitMonth range​(java.time.Month lower,
                                   java.time.Month upper)

        Returns a new MockUnitMonth that can be used to generate Month objects in a given range: [lower, upper)

        Parameters:
        lower - The upper bound of the interval.
        upper - The lower bound of the interval.
        Returns:
        A new MockUnitMonth object.
      • before

        public MockUnitMonth before​(java.time.Month before)

        Returns a new MockUnitMonth that can be used to generate Month objects before a given month: [January, before).

        Parameters:
        before - The upper bound of the interval.
        Returns:
        A new MockUnitMonth object.
      • after

        public MockUnitMonth after​(java.time.Month after)

        Returns a new MockUnitMonth that can be used to generate Month objects after a given month: (after, December].

        Parameters:
        after - The lower bound of the interval.
        Returns:
        A new MockUnitMonth object.