net.java.quickcheck.generator
Class Generators

java.lang.Object
  extended by net.java.quickcheck.generator.Generators

public class Generators
extends Object


Method Summary
static
<T> Generator<T>
cast(Generator<? extends T> generator)
          Cast a generator to a super type generator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

cast

public static <T> Generator<T> cast(Generator<? extends T> generator)
Cast a generator to a super type generator.

This method can be used to cast a generator of type Generator to a generator of type Generator given that A extends B. This operator is valid as all Generator instances are covariant (are pure producers).



Copyright © 2011. All Rights Reserved.