package com.ihaoin.hooloo.device.util;

import java.util.List;
import java.util.Random;

public class RandomUtils {
    public static Long nextLong(List<Long> longs) {
        Long val = new Random().nextLong();
        if (CollectionUtils.isEmpty(longs)) {
            return val;
        }
        if (longs.contains(val)) {
            return nextLong(longs);
        }
        return val;
    }
    public static Integer nextInt(List<Integer> ints) {
        Integer val = new Random().nextInt();
        if (CollectionUtils.isEmpty(ints)) {
            return val;
        }
        if (ints.contains(val)) {
            return nextInt(ints);
        }
        return val;
    }
}
