Package org.apache.myfaces.util.lang
Class XorShiftRandom
java.lang.Object
org.apache.myfaces.util.lang.XorShiftRandom
- Direct Known Subclasses:
- ThreadsafeXorShiftRandom
A simple XORShift Random generator.
 This class is NOT synchronized, you need to do that yourself if needed!
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
XorShiftRandompublic XorShiftRandom(long initialSeed) 
 
- 
- 
Method Details- 
randompublic long random()Calculate a random value based on the previous value stored in this instance. If you use this method in a concurring way, you need to synchronize the access!- Returns:
 
- 
randompublic static long random(long randomStart) Calculate a random value based on the given start Value.- Parameters:
- randomStart- the start value. Usually the result of the previous invocation
- Returns:
- the new random value.
 
 
-