package weka.clusterers.forMetisMQI.util;

public class Random extends java.util.Random {

	private static final long serialVersionUID = 1L;
	
	private static Random instance = null;
	
	private long seed = 1234567890;
	
	/**
	 * Return an instance of a random generator with a random seed.
	 * @return
	 */
	public static Random instance() {
		if(instance == null) {
			instance = new Random(/*new java.util.Random().nextLong()*/1234567890);
		}
		return instance;
	}
	
	public long getSeed() {
		return seed;
	}
	
	private Random(long seed) {
		super(seed);
		this.seed = seed;
	}

}
