Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SequenceGenerator.java')
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SequenceGenerator.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SequenceGenerator.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SequenceGenerator.java
deleted file mode 100644
index e8e5c71e1..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SequenceGenerator.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Random;
-
-/**
- * Encapsulates algorithms and state for generating deterministic sequences.
- * The sequence of numbers generated will always follow the same pattern,
- * regardless of the time, place, or platform.
- */
-public class SequenceGenerator {
- private static long globalSeqNum = System.currentTimeMillis() * 1000;
- private final Random random;
- private int uniqueInt;
-
- /**
- * Constructs a new sequence generator with a known seed.
- */
- public SequenceGenerator() {
- random = new Random(3141592653589793238L); // a known constant
- uniqueInt = 1000000;
- }
-
- /**
- * Returns a globally unique long integer.
- */
- public static long nextGloballyUniqueLong() {
- return globalSeqNum++;
- }
-
- /**
- * Returns a unique 7-digit integer.
- */
- public int nextUniqueInt() {
- return uniqueInt++;
- }
-
- /**
- * Returns a pseudo-random integer between 0 and n-1.
- * @see Random#nextInt(int)
- */
- public int nextInt(int n) {
- return random.nextInt(n);
- }
-
- /**
- * Returns a pseudo-random real number following a gaussian distribution.
- * @see Random#nextGaussian()
- */
- public double nextGaussian() {
- return random.nextGaussian();
- }
-}

Back to the top