All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.daredayo.util.collection.LongSkipper Maven / Gradle / Ivy

package com.daredayo.util.collection;

import java.util.function.Supplier;

public class LongSkipper implements Supplier {

	long number;
	long skip;

	public LongSkipper(long skip) {
		super();
		this.skip = skip;
		number = 0;
	}

	public LongSkipper(long base, long skip) {
		super();
		this.skip = skip;
		number = base;
	}

	@Override
	public Long get() {
		// check over flow ? 
		long current = number;
		number += skip;
		return current;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy