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

net.thucydides.core.screenshots.ScreenshotSequence Maven / Gradle / Ivy

There is a newer version: 4.2.1
Show newest version
package net.thucydides.core.screenshots;

import java.util.concurrent.atomic.AtomicLong;

/**
 * A simple sequencer for screenshot numbers.
 * Numbers are guaranteed to be sequential.
 *
 */
public class ScreenshotSequence {
    private AtomicLong sequenceNumber = new AtomicLong(1);

    /**
     * Return the next number in the sequence.
     */
    public long next() {
        return sequenceNumber.getAndIncrement();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy