private List<SimpleLottery> getAllLotteries(Lottery.Type type, boolean noFilter) { final LotteryConfiguration configuration = LotteryConfiguration.getWithType(type); List<List<Integer>> normals = NumUtils.exhaustC(configuration.getNormalRange(), configuration.getNormalSize()); List<List<Integer>> specials = NumUtils.exhaustC(configuration.getSpecialRange(), configuration.getSpecialSize()); List<SimpleLottery> allLotteries = new ArrayList<>(normals.size() * specials.size()); System.out.println( "calculateAndSave integers finished! all size: " + normals.size() * specials.size()); for (int i = 0; i < specials.size(); i++) { for (int j = 0; j < normals.size(); j++) { final SimpleLottery simpleLottery = new SimpleLottery(normals.get(j), specials.get(i)); if (noFilter) { allLotteries.add(simpleLottery); } else if (!hasTooMuchSequence(normals.get(j), type)) { int sum = sum(simpleLottery); int odd = odd(normals.get(j)); if (type == Lottery.Type.DLT) { // dlt 从57 < sum < 157 if (sum >= 157 || sum <= 57) { continue; } } else { // ssq 从63 < sum < 161 if (sum >= 161 || sum <= 63) { continue; } } allLotteries.add(simpleLottery); } } } System.out.println("all lotteries ready: size: " + allLotteries.size()); return allLotteries; }