public final class DrawnLotteryNumbersExtensions extends Object
DrawnLotteryNumbersExtensions provides utility methods to draw lottery numbers
with different algorithms| Constructor and Description |
|---|
DrawnLotteryNumbersExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static Set<Integer> |
draw(int maxNumbers,
int volume)
Draw of lottery numbers.
|
static Set<Integer> |
draw(int maxNumbers,
int minVolume,
int maxVolume)
Draw of lottery numbers.
|
static Set<Integer> |
drawDefaultAlgorithm(int maxNumbers,
int minVolume,
int maxVolume)
This draw algorithm simulates the real world.
|
static Set<Integer> |
drawFromMultiMap(int maxNumbers,
int minVolume,
int maxVolume,
int drawCount)
Draw of lottery numbers from given drawCount and take the numbers that are drawn the most
times and return a new set.
|
static Set<Integer> |
drawFromMultiMap(int maxNumbers,
int minVolume,
int maxVolume,
int drawCount,
boolean mostDrawn)
Draw of lottery numbers from given drawCount and take the numbers that are drawn the most
times and return a new set.
|
static Set<Integer> |
drawFromMultiMap(int maxNumbers,
int minVolume,
int maxVolume,
int drawCount,
boolean mostDrawn,
boolean paranoid)
Draw of lottery numbers from given drawCount and take the numbers that are drawn the most
times and return a new set.
|
static int |
drawGameSeventySeven()
Draw the number of the game seventy seven
|
static Set<Integer> |
drawParanoidFromMultiMap(int maxNumbers,
int minVolume,
int maxVolume,
int drawCount)
Draw of paranoid lottery numbers from given drawCount and take the numbers that are drawn the
most times and return a new set.
|
static int |
drawSuperNumber(Set<Integer> alreadyDrawnNumbers,
int volume)
Draws a super number that is not in the given already drawn numbers
Set. |
static int |
drawSuperNumber(Set<Integer> alreadyDrawnNumbers,
int minVolume,
int maxVolume)
Draws a super number that is not in the given already drawn numbers
Set. |
static Set<Integer> |
resolveLotteryNumbers(int maxNumbers,
Comparator<Integer> mostDrawn,
Map<Integer,Integer> numberCounterMap)
Resolves the lottery numbers from the given number counter map in the order from the given
comparator limited to maxNumbers
|
public static int drawSuperNumber(Set<Integer> alreadyDrawnNumbers, int volume)
Set.alreadyDrawnNumbers - the already drawn numbersvolume - the volume of the numbers starts from 1 till volumepublic static int drawSuperNumber(Set<Integer> alreadyDrawnNumbers, int minVolume, int maxVolume)
Set.alreadyDrawnNumbers - the already drawn numbersminVolume - the min volumemaxVolume - the max volumepublic static int drawGameSeventySeven()
public static Set<Integer> draw(int maxNumbers, int volume)
maxNumbers - the max number to drawvolume - the volume of the numbers starts from 1 till volumepublic static Set<Integer> draw(int maxNumbers, int minVolume, int maxVolume)
maxNumbers - the maximum of numbers to drawminVolume - the min volumemaxVolume - the max volumepublic static Set<Integer> drawFromMultiMap(int maxNumbers, int minVolume, int maxVolume, int drawCount)
maxNumbers - the maximum of numbers to drawminVolume - the min volumemaxVolume - the max volumedrawCount - the draw count defines how many times to draw numberspublic static Set<Integer> drawParanoidFromMultiMap(int maxNumbers, int minVolume, int maxVolume, int drawCount)
maxNumbers - the maximum of numbers to drawminVolume - the min volumemaxVolume - the max volumedrawCount - the draw count defines how many times to draw numberspublic static Set<Integer> drawFromMultiMap(int maxNumbers, int minVolume, int maxVolume, int drawCount, boolean mostDrawn)
maxNumbers - the maximum of numbers to drawminVolume - the min volumemaxVolume - the max volumedrawCount - the draw count defines how many times to draw numbersmostDrawn - the flag that indicates if the most drawn numbers should be taken if true,
otherwise the reverse order will be takenpublic static Set<Integer> drawFromMultiMap(int maxNumbers, int minVolume, int maxVolume, int drawCount, boolean mostDrawn, boolean paranoid)
maxNumbers - the maximum of numbers to drawminVolume - the min volumemaxVolume - the max volumedrawCount - the draw count defines how many times to draw numbersmostDrawn - the flag that indicates if the most drawn numbers should be taken if true,
otherwise the reverse order will be takenparanoid - the flag paranoid indicates to create a custom comparator from the counter map and
define a random defined order to draw if true, otherwise the flag mostDrawn will
define the order to drawpublic static Set<Integer> resolveLotteryNumbers(int maxNumbers, Comparator<Integer> mostDrawn, Map<Integer,Integer> numberCounterMap)
maxNumbers - the max numbersmostDrawn - the comparator that defines in which order to take the drawn numbers. For instance
if you want to have the reverse order you can simply give the
Comparator.reverseOrder() or you can define your custom ordernumberCounterMap - the number counter mappublic static Set<Integer> drawDefaultAlgorithm(int maxNumbers, int minVolume, int maxVolume)
maxNumbers - the max number to drawminVolume - the min volumemaxVolume - the volume of the numbers starts from 1 till volumeCopyright © 2015–2019 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.