com.hammingweight.hammock.mocks.util
Class MockRandom

java.lang.Object
  extended by java.util.Random
      extended by com.hammingweight.hammock.mocks.util.MockRandom
All Implemented Interfaces:
IMockObject

public class MockRandom
extends java.util.Random
implements IMockObject


Field Summary
static MockMethod MTHD_NEXT_$_INT
           
static MockMethod MTHD_NEXT_DOUBLE
           
static MockMethod MTHD_NEXT_FLOAT
           
static MockMethod MTHD_NEXT_INT
           
static MockMethod MTHD_NEXT_LONG
           
static MockMethod MTHD_SET_SEED_$_LONG
           
 
Constructor Summary
MockRandom()
           
MockRandom(IInvocationHandler handler)
           
MockRandom(long arg0)
           
MockRandom(long arg0, IInvocationHandler handler)
           
 
Method Summary
 IInvocationHandler getInvocationHandler()
          Gets the invocation handler that the mock object uses to evaluate method invocations.
 int next(int arg0)
           
 double nextDouble()
           
 float nextFloat()
           
 int nextInt()
           
 long nextLong()
           
 void setInvocationHandler(IInvocationHandler handler)
          Sets the invocation handler that the mock object should use to evaluate method invocations.
 void setSeed(long arg0)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MTHD_NEXT_DOUBLE

public static final MockMethod MTHD_NEXT_DOUBLE

MTHD_NEXT_FLOAT

public static final MockMethod MTHD_NEXT_FLOAT

MTHD_NEXT_$_INT

public static final MockMethod MTHD_NEXT_$_INT

MTHD_NEXT_INT

public static final MockMethod MTHD_NEXT_INT

MTHD_NEXT_LONG

public static final MockMethod MTHD_NEXT_LONG

MTHD_SET_SEED_$_LONG

public static final MockMethod MTHD_SET_SEED_$_LONG
Constructor Detail

MockRandom

public MockRandom(long arg0)

MockRandom

public MockRandom(long arg0,
                  IInvocationHandler handler)

MockRandom

public MockRandom()

MockRandom

public MockRandom(IInvocationHandler handler)
Method Detail

setInvocationHandler

public final void setInvocationHandler(IInvocationHandler handler)
Description copied from interface: IMockObject
Sets the invocation handler that the mock object should use to evaluate method invocations.

Specified by:
setInvocationHandler in interface IMockObject
Parameters:
handler - The invocation handler to be used by the mock object.

getInvocationHandler

public final IInvocationHandler getInvocationHandler()
Description copied from interface: IMockObject
Gets the invocation handler that the mock object uses to evaluate method invocations.

Specified by:
getInvocationHandler in interface IMockObject
Returns:
The invocation handler used by the mock object.

nextDouble

public double nextDouble()
Overrides:
nextDouble in class java.util.Random

nextFloat

public float nextFloat()
Overrides:
nextFloat in class java.util.Random

next

public int next(int arg0)
Overrides:
next in class java.util.Random

nextInt

public int nextInt()
Overrides:
nextInt in class java.util.Random

nextLong

public long nextLong()
Overrides:
nextLong in class java.util.Random

setSeed

public void setSeed(long arg0)
Overrides:
setSeed in class java.util.Random