org.identityconnectors.contract.data.groovy
Class Random

java.lang.Object
  extended by org.identityconnectors.contract.data.groovy.Lazy
      extended by org.identityconnectors.contract.data.groovy.Random

public class Random
extends Lazy

Generate random strings based on given pattern

This is a Helper class, users of tests will access methods: Lazy.random(Object) and Lazy.get(Object))

Author:
Zdenek Louzensky

Field Summary
 
Fields inherited from class org.identityconnectors.contract.data.groovy.Lazy
successors, value
 
Constructor Summary
protected Random(Object pattern)
          Creates a random string based on given pattern.
protected Random(Object pattern, Class<?> clazz)
          Creates a random object of given type
 
Method Summary
 Object generate()
          create a random value, that is created once.
 Class<?> getClazz()
           
 
Methods inherited from class org.identityconnectors.contract.data.groovy.Lazy
get, getSuccessors, getValue, plus, plus, random, random, setSuccessors, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Random

protected Random(Object pattern)
Creates a random string based on given pattern.

Parameters:
pattern - format of pattern
See Also:
org.identityconnectors.contract.data.RandomGenerator#generate(String)}

Random

protected Random(Object pattern,
                 Class<?> clazz)
Creates a random object of given type

Parameters:
pattern -
clazz - the class that will be the type of generated object
See Also:
org.identityconnectors.contract.data.RandomGenerator#generate(String)}
Method Detail

generate

public Object generate()
create a random value, that is created once. However further queries will return the same random value.


getClazz

public Class<?> getClazz()
Returns:
the type of generated random class


Copyright © 2011. All Rights Reserved.