Class DrawnLotteryNumbersFactory


  • public final class DrawnLotteryNumbersFactory
    extends java.lang.Object
    A factory for creating DrawnLotteryNumbers objects with generated lottery numbers
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.Integer,​java.lang.Integer> newNumberCounterMap​(int minVolume, int maxVolume)
      Factory method for create a map for count drawn numbers
      static java.util.Map<java.lang.Integer,​java.lang.Integer> newNumberCounterMap​(int minVolume, int maxVolume, java.util.Map<java.lang.Integer,​java.lang.Integer> numberCounterMap)
      Factory method for create a map for count drawn numbers and will be summarized with the given Map
      static de.alpharogroup.lottery.drawings.DrawnLotteryNumbers newRandomDrawnLotteryNumbers()
      Factory method for create a new DrawnLotteryNumbers object with all drawn numbers
      static de.alpharogroup.lottery.drawings.DrawnLotteryNumbers newRandomDrawnLotteryNumbers​(int max, int volume)
      Factory method for create a new DrawnLotteryNumbers object with all drawn numbers
      static de.alpharogroup.lottery.drawings.DrawnLotteryNumbers newRandomDrawnLotteryNumbers​(int max, int minVolume, int maxVolume)
      Factory method for create a new DrawnLotteryNumbers object with all drawn numbers
      static de.alpharogroup.lottery.drawings.DrawnLotteryNumbers newRandomDrawnLotteryNumbers​(int max, int minVolume, int maxVolume, int drawCount, de.alpharogroup.lottery.enums.LotteryAlgorithm algorithm)
      Factory method for create a new DrawnLotteryNumbers object with all drawn numbers with the given algorithm
      static de.alpharogroup.lottery.drawings.DrawnLotteryNumbers newRandomDrawnLotteryNumbers​(int max, int minVolume, int maxVolume, de.alpharogroup.lottery.enums.LotteryAlgorithm algorithm)
      Factory method for create a new DrawnLotteryNumbers object with all drawn numbers with the given algorithm
      static de.alpharogroup.lottery.drawings.DrawnLotteryNumbers newRandomDrawnLotteryNumbersDefaultAlgorithm​(int max, int volume)
      Factory method for create a new DrawnLotteryNumbers object with all drawn numbers
      • Methods inherited from class java.lang.Object

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

      • newNumberCounterMap

        public static java.util.Map<java.lang.Integer,​java.lang.Integer> newNumberCounterMap​(int minVolume,
                                                                                                   int maxVolume)
        Factory method for create a map for count drawn numbers
        Parameters:
        minVolume - the min volume
        maxVolume - the max volume
        Returns:
        the new map with the initial values
      • newNumberCounterMap

        public static java.util.Map<java.lang.Integer,​java.lang.Integer> newNumberCounterMap​(int minVolume,
                                                                                                   int maxVolume,
                                                                                                   java.util.Map<java.lang.Integer,​java.lang.Integer> numberCounterMap)
        Factory method for create a map for count drawn numbers and will be summarized with the given Map
        Parameters:
        minVolume - the min volume
        maxVolume - the max volume
        numberCounterMap - the Map that will be summarized
        Returns:
        the new map with the initial values
      • newRandomDrawnLotteryNumbers

        public static de.alpharogroup.lottery.drawings.DrawnLotteryNumbers newRandomDrawnLotteryNumbers()
        Factory method for create a new DrawnLotteryNumbers object with all drawn numbers
        Returns:
        the new DrawnLotteryNumbers
      • newRandomDrawnLotteryNumbers

        public static de.alpharogroup.lottery.drawings.DrawnLotteryNumbers newRandomDrawnLotteryNumbers​(int max,
                                                                                                        int volume)
        Factory method for create a new DrawnLotteryNumbers object with all drawn numbers
        Parameters:
        max - the max number to draw
        volume - the volume of the numbers starts from 1 till volume
        Returns:
        the new DrawnLotteryNumbers
      • newRandomDrawnLotteryNumbers

        public static de.alpharogroup.lottery.drawings.DrawnLotteryNumbers newRandomDrawnLotteryNumbers​(int max,
                                                                                                        int minVolume,
                                                                                                        int maxVolume)
        Factory method for create a new DrawnLotteryNumbers object with all drawn numbers
        Parameters:
        max - the max number to draw
        minVolume - the min volume
        maxVolume - the max volume
        Returns:
        the new DrawnLotteryNumbers
      • newRandomDrawnLotteryNumbers

        public static de.alpharogroup.lottery.drawings.DrawnLotteryNumbers newRandomDrawnLotteryNumbers​(int max,
                                                                                                        int minVolume,
                                                                                                        int maxVolume,
                                                                                                        int drawCount,
                                                                                                        de.alpharogroup.lottery.enums.LotteryAlgorithm algorithm)
        Factory method for create a new DrawnLotteryNumbers object with all drawn numbers with the given algorithm
        Parameters:
        max - the max number to draw
        minVolume - the min volume
        maxVolume - the max volume
        drawCount - the draw count defines how many times to draw numbers. Note: only with map algorithm
        algorithm - the algorithm to use
        Returns:
        the new DrawnLotteryNumbers
      • newRandomDrawnLotteryNumbers

        public static de.alpharogroup.lottery.drawings.DrawnLotteryNumbers newRandomDrawnLotteryNumbers​(int max,
                                                                                                        int minVolume,
                                                                                                        int maxVolume,
                                                                                                        de.alpharogroup.lottery.enums.LotteryAlgorithm algorithm)
        Factory method for create a new DrawnLotteryNumbers object with all drawn numbers with the given algorithm
        Parameters:
        max - the max number to draw
        minVolume - the min volume
        maxVolume - the max volume
        algorithm - the algorithm to use
        Returns:
        the new DrawnLotteryNumbers
      • newRandomDrawnLotteryNumbersDefaultAlgorithm

        public static de.alpharogroup.lottery.drawings.DrawnLotteryNumbers newRandomDrawnLotteryNumbersDefaultAlgorithm​(int max,
                                                                                                                        int volume)
        Factory method for create a new DrawnLotteryNumbers object with all drawn numbers
        Parameters:
        max - the max number to draw
        volume - the volume of the numbers starts from 1 till volume
        Returns:
        the new DrawnLotteryNumbers