Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg

This software is released under an open source BSD licence.

fj.test
Class Coarbitrary<A>

java.lang.Object
  extended by fj.test.Coarbitrary<A>

public abstract class Coarbitrary<A>
extends Object

Transforms a type and a generator to produce a new generator. This function is used to generate arbitrary functions.


Field Summary
static Coarbitrary<BigDecimal> coarbBigDecimal
           
static Coarbitrary<BigInteger> coarbBigInteger
           
static Coarbitrary<BitSet> coarbBitSet
          A coarbitrary for bit sets.
static Coarbitrary<Boolean> coarbBoolean
          A coarbitrary for booleans.
static Coarbitrary<Byte> coarbByte
          A coarbitrary for bytes.
static Coarbitrary<Calendar> coarbCalendar
          A coarbitrary for calendars.
static Coarbitrary<Character> coarbCharacter
          A coarbitrary for characters.
static Coarbitrary<Date> coarbDate
          A coarbitrary for dates.
static Coarbitrary<Double> coarbDouble
          A coarbitrary for doubles.
static Coarbitrary<Float> coarbFloat
          A coarbitrary for floats.
static Coarbitrary<GregorianCalendar> coarbGregorianCalendar
          A coarbitrary for gregorian calendars.
static Coarbitrary<Integer> coarbInteger
          A coarbitrary for integers.
static Coarbitrary<Long> coarbLong
          A coarbitrary for longs.
static Coarbitrary<Properties> coarbProperties
          A coarbitrary for properties.
static Coarbitrary<Short> coarbShort
          A coarbitrary for shorts.
static Coarbitrary<Date> coarbSQLDate
           
static Coarbitrary<String> coarbString
          A coarbitrary for strings.
static Coarbitrary<StringBuffer> coarbStringBuffer
          A coarbitrary for string buffers.
static Coarbitrary<StringBuilder> coarbStringBuilder
          A coarbitrary for string builders.
static Coarbitrary<Throwable> coarbThrowable
          A coarbitrary for throwables.
static Coarbitrary<Time> coarbTime
           
static Coarbitrary<Timestamp> coarbTimestamp
           
 
Constructor Summary
Coarbitrary()
           
 
Method Summary
static
<A> Coarbitrary<Array<A>>
coarbArray(Coarbitrary<A> ca)
          A coarbitrary for arrays.
static
<A> Coarbitrary<ArrayBlockingQueue<A>>
coarbArrayBlockingQueue(Coarbitrary<A> c)
          A coarbitrary for array blocking queues.
static
<A> Coarbitrary<ArrayList<A>>
coarbArrayList(Coarbitrary<A> ca)
          A coarbitrary for array lists.
static
<K,V> Coarbitrary<ConcurrentHashMap<K,V>>
coarbConcurrentHashMap(Coarbitrary<K> ck, Coarbitrary<V> cv)
          A coarbitrary for concurrent hash maps.
static
<A> Coarbitrary<ConcurrentLinkedQueue<A>>
coarbConcurrentLinkedQueue(Coarbitrary<A> c)
          A coarbitrary for concurrent linked queues.
static
<A> Coarbitrary<CopyOnWriteArrayList<A>>
coarbCopyOnWriteArrayList(Coarbitrary<A> c)
          A coarbitrary for copy-on-write array lists.
static
<A> Coarbitrary<CopyOnWriteArraySet<A>>
coarbCopyOnWriteArraySet(Coarbitrary<A> c)
          A coarbitrary for copy-on-write array sets.
static
<A extends Delayed>
Coarbitrary<DelayQueue<A>>
coarbDelayQueue(Coarbitrary<A> c)
          A coarbitrary for delay queues.
static
<A,B> Coarbitrary<Either<A,B>>
coarbEither(Coarbitrary<A> ca, Coarbitrary<B> cb)
          A coarbitrary for the disjoint union.
static
<K extends Enum<K>,V>
Coarbitrary<EnumMap<K,V>>
coarbEnumMap(Coarbitrary<K> ck, Coarbitrary<V> cv)
          A coarbitrary for enum maps.
static
<A extends Enum<A>>
Coarbitrary<EnumSet<A>>
coarbEnumSet(Coarbitrary<A> c)
          A coarbitrary for enum sets.
static
<A,B> Coarbitrary<F<A,B>>
coarbF(Arbitrary<A> a, Coarbitrary<B> c)
          A coarbitrary for a function.
static
<A,B,C> Coarbitrary<F2<A,B,C>>
coarbF2(Arbitrary<A> aa, Arbitrary<B> ab, Coarbitrary<C> c)
          A coarbitrary for a function-2.
static
<A,B,C,D> Coarbitrary<F3<A,B,C,D>>
coarbF3(Arbitrary<A> aa, Arbitrary<B> ab, Arbitrary<C> ac, Coarbitrary<D> c)
          A coarbitrary for a function-3.
static
<A,B,C,D,E>
Coarbitrary<F4<A,B,C,D,E>>
coarbF4(Arbitrary<A> aa, Arbitrary<B> ab, Arbitrary<C> ac, Arbitrary<D> ad, Coarbitrary<E> c)
          A coarbitrary for a function-4.
static
<A,B,C,D,E,F$>
Coarbitrary<F5<A,B,C,D,E,F$>>
coarbF5(Arbitrary<A> aa, Arbitrary<B> ab, Arbitrary<C> ac, Arbitrary<D> ad, Arbitrary<E> ae, Coarbitrary<F$> c)
          A coarbitrary for a function-5.
static
<A,B,C,D,E,F$,G>
Coarbitrary<F6<A,B,C,D,E,F$,G>>
coarbF6(Arbitrary<A> aa, Arbitrary<B> ab, Arbitrary<C> ac, Arbitrary<D> ad, Arbitrary<E> ae, Arbitrary<F$> af, Coarbitrary<G> c)
          A coarbitrary for a function-6.
static
<A,B,C,D,E,F$,G,H>
Coarbitrary<F7<A,B,C,D,E,F$,G,H>>
coarbF7(Arbitrary<A> aa, Arbitrary<B> ab, Arbitrary<C> ac, Arbitrary<D> ad, Arbitrary<E> ae, Arbitrary<F$> af, Arbitrary<G> ag, Coarbitrary<H> c)
          A coarbitrary for a function-7.
static
<A,B,C,D,E,F$,G,H,I>
Coarbitrary<F8<A,B,C,D,E,F$,G,H,I>>
coarbF8(Arbitrary<A> aa, Arbitrary<B> ab, Arbitrary<C> ac, Arbitrary<D> ad, Arbitrary<E> ae, Arbitrary<F$> af, Arbitrary<G> ag, Arbitrary<H> ah, Coarbitrary<I> c)
          A coarbitrary for a function-8.
static
<K,V> Coarbitrary<HashMap<K,V>>
coarbHashMap(Coarbitrary<K> ck, Coarbitrary<V> cv)
          A coarbitrary for hash maps.
static
<A> Coarbitrary<HashSet<A>>
coarbHashSet(Coarbitrary<A> c)
          A coarbitrary for hash sets.
static
<K,V> Coarbitrary<Hashtable<K,V>>
coarbHashtable(Coarbitrary<K> ck, Coarbitrary<V> cv)
          A coarbitrary for hash tables.
static
<K,V> Coarbitrary<IdentityHashMap<K,V>>
coarbIdentityHashMap(Coarbitrary<K> ck, Coarbitrary<V> cv)
          A coarbitrary for identity hash maps.
<B> F<Gen<B>,Gen<B>>
coarbitrary(A a)
          A curried version of coarbitrary(Object, Gen).
abstract
<B> Gen<B>
coarbitrary(A a, Gen<B> g)
          Transforms the given value and generator to a new generator with a high probability of being independent.
static
<A> Coarbitrary<LinkedBlockingQueue<A>>
coarbLinkedBlockingQueue(Coarbitrary<A> c)
          A coarbitrary for linked blocking queues.
static
<K,V> Coarbitrary<LinkedHashMap<K,V>>
coarbLinkedHashMap(Coarbitrary<K> ck, Coarbitrary<V> cv)
          A coarbitrary for linked hash maps.
static
<A> Coarbitrary<LinkedHashSet<A>>
coarbLinkedHashSet(Coarbitrary<A> c)
          A coarbitrary for linked hash sets.
static
<A> Coarbitrary<LinkedList<A>>
coarbLinkedList(Coarbitrary<A> c)
          A coarbitrary for linked lists.
static
<A> Coarbitrary<List<A>>
coarbList(Coarbitrary<A> ca)
          A coarbitrary for lists.
static
<A> Coarbitrary<Option<A>>
coarbOption(Coarbitrary<A> ca)
          A coarbitrary for the optional value.
static
<A> Coarbitrary<P1<A>>
coarbP1(Coarbitrary<A> ca)
          A coarbitrary for product-1 values.
static
<A,B> Coarbitrary<P2<A,B>>
coarbP2(Coarbitrary<A> ca, Coarbitrary<B> cb)
          A coarbitrary for product-2 values.
static
<A,B,C> Coarbitrary<P3<A,B,C>>
coarbP3(Coarbitrary<A> ca, Coarbitrary<B> cb, Coarbitrary<C> cc)
          A coarbitrary for product-3 values.
static
<A,B,C,D> Coarbitrary<P4<A,B,C,D>>
coarbP4(Coarbitrary<A> ca, Coarbitrary<B> cb, Coarbitrary<C> cc, Coarbitrary<D> cd)
          A coarbitrary for product-4 values.
static
<A,B,C,D,E>
Coarbitrary<P5<A,B,C,D,E>>
coarbP5(Coarbitrary<A> ca, Coarbitrary<B> cb, Coarbitrary<C> cc, Coarbitrary<D> cd, Coarbitrary<E> ce)
          A coarbitrary for product-5 values.
static
<A,B,C,D,E,F$>
Coarbitrary<P6<A,B,C,D,E,F$>>
coarbP6(Coarbitrary<A> ca, Coarbitrary<B> cb, Coarbitrary<C> cc, Coarbitrary<D> cd, Coarbitrary<E> ce, Coarbitrary<F$> cf)
          A coarbitrary for product-6 values.
static
<A,B,C,D,E,F$,G>
Coarbitrary<P7<A,B,C,D,E,F$,G>>
coarbP7(Coarbitrary<A> ca, Coarbitrary<B> cb, Coarbitrary<C> cc, Coarbitrary<D> cd, Coarbitrary<E> ce, Coarbitrary<F$> cf, Coarbitrary<G> cg)
          A coarbitrary for product-7 values.
static
<A,B,C,D,E,F$,G,H>
Coarbitrary<P8<A,B,C,D,E,F$,G,H>>
coarbP8(Coarbitrary<A> ca, Coarbitrary<B> cb, Coarbitrary<C> cc, Coarbitrary<D> cd, Coarbitrary<E> ce, Coarbitrary<F$> cf, Coarbitrary<G> cg, Coarbitrary<H> ch)
          A coarbitrary for product-8 values.
static
<A> Coarbitrary<PriorityBlockingQueue<A>>
coarbPriorityBlockingQueue(Coarbitrary<A> c)
          A coarbitrary for priority blocking queues.
static
<A> Coarbitrary<PriorityQueue<A>>
coarbPriorityQueue(Coarbitrary<A> c)
          A coarbitrary for priority queues.
static
<A> Coarbitrary<Stack<A>>
coarbStack(Coarbitrary<A> c)
          A coarbitrary for stacks.
static
<A> Coarbitrary<Stream<A>>
coarbStream(Coarbitrary<A> ca)
          A coarbitrary for streams.
static
<A> Coarbitrary<SynchronousQueue<A>>
coarbSynchronousQueue(Coarbitrary<A> c)
          A coarbitrary for synchronous queues.
static Coarbitrary<Throwable> coarbThrowable(Coarbitrary<String> cs)
          A coarbitrary for throwables.
static
<K,V> Coarbitrary<TreeMap<K,V>>
coarbTreeMap(Coarbitrary<K> ck, Coarbitrary<V> cv)
          A coarbitrary for tree maps.
static
<A> Coarbitrary<TreeSet<A>>
coarbTreeSet(Coarbitrary<A> c)
          A coarbitrary for tree sets.
static
<A> Coarbitrary<Vector<A>>
coarbVector(Coarbitrary<A> c)
          A coarbitrary for vectors.
static
<K,V> Coarbitrary<WeakHashMap<K,V>>
coarbWeakHashMap(Coarbitrary<K> ck, Coarbitrary<V> cv)
          A coarbitrary for weak hash maps.
<B> Coarbitrary<B>
comap(F<B,A> f)
          Co-maps this coarbitrary using the given function.
<B> Coarbitrary<B>
compose(F<B,A> f)
          Composes the given function with this coarbitrary to produce a new coarbitrary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coarbBoolean

public static final Coarbitrary<Boolean> coarbBoolean
A coarbitrary for booleans.


coarbInteger

public static final Coarbitrary<Integer> coarbInteger
A coarbitrary for integers.


coarbByte

public static final Coarbitrary<Byte> coarbByte
A coarbitrary for bytes.


coarbShort

public static final Coarbitrary<Short> coarbShort
A coarbitrary for shorts.


coarbLong

public static final Coarbitrary<Long> coarbLong
A coarbitrary for longs.


coarbCharacter

public static final Coarbitrary<Character> coarbCharacter
A coarbitrary for characters.


coarbFloat

public static final Coarbitrary<Float> coarbFloat
A coarbitrary for floats.


coarbDouble

public static final Coarbitrary<Double> coarbDouble
A coarbitrary for doubles.


coarbString

public static final Coarbitrary<String> coarbString
A coarbitrary for strings.


coarbStringBuffer

public static final Coarbitrary<StringBuffer> coarbStringBuffer
A coarbitrary for string buffers.


coarbStringBuilder

public static final Coarbitrary<StringBuilder> coarbStringBuilder
A coarbitrary for string builders.


coarbThrowable

public static final Coarbitrary<Throwable> coarbThrowable
A coarbitrary for throwables.


coarbBitSet

public static final Coarbitrary<BitSet> coarbBitSet
A coarbitrary for bit sets.


coarbCalendar

public static final Coarbitrary<Calendar> coarbCalendar
A coarbitrary for calendars.


coarbDate

public static final Coarbitrary<Date> coarbDate
A coarbitrary for dates.


coarbGregorianCalendar

public static final Coarbitrary<GregorianCalendar> coarbGregorianCalendar
A coarbitrary for gregorian calendars.


coarbProperties

public static final Coarbitrary<Properties> coarbProperties
A coarbitrary for properties.


coarbSQLDate

public static final Coarbitrary<Date> coarbSQLDate

coarbTimestamp

public static final Coarbitrary<Timestamp> coarbTimestamp

coarbTime

public static final Coarbitrary<Time> coarbTime

coarbBigInteger

public static final Coarbitrary<BigInteger> coarbBigInteger

coarbBigDecimal

public static final Coarbitrary<BigDecimal> coarbBigDecimal
Constructor Detail

Coarbitrary

public Coarbitrary()
Method Detail

coarbitrary

public abstract <B> Gen<B> coarbitrary(A a,
                                       Gen<B> g)
Transforms the given value and generator to a new generator with a high probability of being independent.

Parameters:
a - The value to produce the generator from.
g - The generator to produce the new generator from.
Returns:
A new generator with a high probability of being independent.

coarbitrary

public <B> F<Gen<B>,Gen<B>> coarbitrary(A a)
A curried version of coarbitrary(Object, Gen).

Parameters:
a - The value to produce the generator from.
Returns:
A curried version of coarbitrary(Object, Gen).

compose

public <B> Coarbitrary<B> compose(F<B,A> f)
Composes the given function with this coarbitrary to produce a new coarbitrary.

Parameters:
f - The function to compose.
Returns:
A new coarbitrary composed with the given function.

comap

public <B> Coarbitrary<B> comap(F<B,A> f)
Co-maps this coarbitrary using the given function.

Parameters:
f - The function to co-map with.
Returns:
A co-mapped coarbitrary.

coarbF

public static <A,B> Coarbitrary<F<A,B>> coarbF(Arbitrary<A> a,
                                               Coarbitrary<B> c)
A coarbitrary for a function.

Parameters:
a - An arbitrary for the domain of the function.
c - A coarbitrary for the codomain of the function.
Returns:
A coarbitrary for a function.

coarbF2

public static <A,B,C> Coarbitrary<F2<A,B,C>> coarbF2(Arbitrary<A> aa,
                                                     Arbitrary<B> ab,
                                                     Coarbitrary<C> c)
A coarbitrary for a function-2.

Parameters:
aa - An arbitrary for part of the domain of the function.
ab - An arbitrary for part of the domain of the function.
c - A coarbitrary for the codomain of the function.
Returns:
A coarbitrary for a function-2.

coarbF3

public static <A,B,C,D> Coarbitrary<F3<A,B,C,D>> coarbF3(Arbitrary<A> aa,
                                                         Arbitrary<B> ab,
                                                         Arbitrary<C> ac,
                                                         Coarbitrary<D> c)
A coarbitrary for a function-3.

Parameters:
aa - An arbitrary for part of the domain of the function.
ab - An arbitrary for part of the domain of the function.
ac - An arbitrary for part of the domain of the function.
c - A coarbitrary for the codomain of the function.
Returns:
A coarbitrary for a function-3.

coarbF4

public static <A,B,C,D,E> Coarbitrary<F4<A,B,C,D,E>> coarbF4(Arbitrary<A> aa,
                                                             Arbitrary<B> ab,
                                                             Arbitrary<C> ac,
                                                             Arbitrary<D> ad,
                                                             Coarbitrary<E> c)
A coarbitrary for a function-4.

Parameters:
aa - An arbitrary for part of the domain of the function.
ab - An arbitrary for part of the domain of the function.
ac - An arbitrary for part of the domain of the function.
ad - An arbitrary for part of the domain of the function.
c - A coarbitrary for the codomain of the function.
Returns:
A coarbitrary for a function-4.

coarbF5

public static <A,B,C,D,E,F$> Coarbitrary<F5<A,B,C,D,E,F$>> coarbF5(Arbitrary<A> aa,
                                                                   Arbitrary<B> ab,
                                                                   Arbitrary<C> ac,
                                                                   Arbitrary<D> ad,
                                                                   Arbitrary<E> ae,
                                                                   Coarbitrary<F$> c)
A coarbitrary for a function-5.

Parameters:
aa - An arbitrary for part of the domain of the function.
ab - An arbitrary for part of the domain of the function.
ac - An arbitrary for part of the domain of the function.
ad - An arbitrary for part of the domain of the function.
ae - An arbitrary for part of the domain of the function.
c - A coarbitrary for the codomain of the function.
Returns:
A coarbitrary for a function-5.

coarbF6

public static <A,B,C,D,E,F$,G> Coarbitrary<F6<A,B,C,D,E,F$,G>> coarbF6(Arbitrary<A> aa,
                                                                       Arbitrary<B> ab,
                                                                       Arbitrary<C> ac,
                                                                       Arbitrary<D> ad,
                                                                       Arbitrary<E> ae,
                                                                       Arbitrary<F$> af,
                                                                       Coarbitrary<G> c)
A coarbitrary for a function-6.

Parameters:
aa - An arbitrary for part of the domain of the function.
ab - An arbitrary for part of the domain of the function.
ac - An arbitrary for part of the domain of the function.
ad - An arbitrary for part of the domain of the function.
ae - An arbitrary for part of the domain of the function.
af - An arbitrary for part of the domain of the function.
c - A coarbitrary for the codomain of the function.
Returns:
A coarbitrary for a function-6.

coarbF7

public static <A,B,C,D,E,F$,G,H> Coarbitrary<F7<A,B,C,D,E,F$,G,H>> coarbF7(Arbitrary<A> aa,
                                                                           Arbitrary<B> ab,
                                                                           Arbitrary<C> ac,
                                                                           Arbitrary<D> ad,
                                                                           Arbitrary<E> ae,
                                                                           Arbitrary<F$> af,
                                                                           Arbitrary<G> ag,
                                                                           Coarbitrary<H> c)
A coarbitrary for a function-7.

Parameters:
aa - An arbitrary for part of the domain of the function.
ab - An arbitrary for part of the domain of the function.
ac - An arbitrary for part of the domain of the function.
ad - An arbitrary for part of the domain of the function.
ae - An arbitrary for part of the domain of the function.
af - An arbitrary for part of the domain of the function.
ag - An arbitrary for part of the domain of the function.
c - A coarbitrary for the codomain of the function.
Returns:
A coarbitrary for a function-7.

coarbF8

public static <A,B,C,D,E,F$,G,H,I> Coarbitrary<F8<A,B,C,D,E,F$,G,H,I>> coarbF8(Arbitrary<A> aa,
                                                                               Arbitrary<B> ab,
                                                                               Arbitrary<C> ac,
                                                                               Arbitrary<D> ad,
                                                                               Arbitrary<E> ae,
                                                                               Arbitrary<F$> af,
                                                                               Arbitrary<G> ag,
                                                                               Arbitrary<H> ah,
                                                                               Coarbitrary<I> c)
A coarbitrary for a function-8.

Parameters:
aa - An arbitrary for part of the domain of the function.
ab - An arbitrary for part of the domain of the function.
ac - An arbitrary for part of the domain of the function.
ad - An arbitrary for part of the domain of the function.
ae - An arbitrary for part of the domain of the function.
af - An arbitrary for part of the domain of the function.
ag - An arbitrary for part of the domain of the function.
ah - An arbitrary for part of the domain of the function.
c - A coarbitrary for the codomain of the function.
Returns:
A coarbitrary for a function-8.

coarbOption

public static <A> Coarbitrary<Option<A>> coarbOption(Coarbitrary<A> ca)
A coarbitrary for the optional value.

Parameters:
ca - A coarbitrary for the type of the optional value.
Returns:
A coarbitrary for the optional value.

coarbEither

public static <A,B> Coarbitrary<Either<A,B>> coarbEither(Coarbitrary<A> ca,
                                                         Coarbitrary<B> cb)
A coarbitrary for the disjoint union.

Parameters:
ca - A coarbitrary for one side of the disjoint union.
cb - A coarbitrary for one side of the disjoint union.
Returns:
A coarbitrary for the disjoint union.

coarbList

public static <A> Coarbitrary<List<A>> coarbList(Coarbitrary<A> ca)
A coarbitrary for lists.

Parameters:
ca - A coarbitrary for the elements of the list.
Returns:
A coarbitrary for lists.

coarbStream

public static <A> Coarbitrary<Stream<A>> coarbStream(Coarbitrary<A> ca)
A coarbitrary for streams.

Parameters:
ca - A coarbitrary for the elements of the stream.
Returns:
A coarbitrary for streams.

coarbArray

public static <A> Coarbitrary<Array<A>> coarbArray(Coarbitrary<A> ca)
A coarbitrary for arrays.

Parameters:
ca - A coarbitrary for the elements of the array.
Returns:
A coarbitrary for arrays.

coarbThrowable

public static Coarbitrary<Throwable> coarbThrowable(Coarbitrary<String> cs)
A coarbitrary for throwables.

Parameters:
cs - A coarbitrary for the throwable message.
Returns:
A coarbitrary for throwables.

coarbArrayList

public static <A> Coarbitrary<ArrayList<A>> coarbArrayList(Coarbitrary<A> ca)
A coarbitrary for array lists.

Parameters:
ca - A coarbitrary for the elements of the array list.
Returns:
A coarbitrary for array lists.

coarbEnumMap

public static <K extends Enum<K>,V> Coarbitrary<EnumMap<K,V>> coarbEnumMap(Coarbitrary<K> ck,
                                                                           Coarbitrary<V> cv)
A coarbitrary for enum maps.

Parameters:
ck - A coarbitrary for the map keys.
cv - A coarbitrary for the map values.
Returns:
A coarbitrary for enum maps.

coarbEnumSet

public static <A extends Enum<A>> Coarbitrary<EnumSet<A>> coarbEnumSet(Coarbitrary<A> c)
A coarbitrary for enum sets.

Parameters:
c - A coarbitrary for the elements of the enum set.
Returns:
A coarbitrary for enum sets.

coarbHashMap

public static <K,V> Coarbitrary<HashMap<K,V>> coarbHashMap(Coarbitrary<K> ck,
                                                           Coarbitrary<V> cv)
A coarbitrary for hash maps.

Parameters:
ck - A coarbitrary for the map keys.
cv - A coarbitrary for the map values.
Returns:
A coarbitrary for hash maps.

coarbHashSet

public static <A> Coarbitrary<HashSet<A>> coarbHashSet(Coarbitrary<A> c)
A coarbitrary for hash sets.

Parameters:
c - A coarbitrary for the elements of the hash set.
Returns:
A coarbitrary for hash sets.

coarbHashtable

public static <K,V> Coarbitrary<Hashtable<K,V>> coarbHashtable(Coarbitrary<K> ck,
                                                               Coarbitrary<V> cv)
A coarbitrary for hash tables.

Parameters:
ck - A coarbitrary for the map keys.
cv - A coarbitrary for the map values.
Returns:
A coarbitrary for hash tables.

coarbIdentityHashMap

public static <K,V> Coarbitrary<IdentityHashMap<K,V>> coarbIdentityHashMap(Coarbitrary<K> ck,
                                                                           Coarbitrary<V> cv)
A coarbitrary for identity hash maps.

Parameters:
ck - A coarbitrary for the map keys.
cv - A coarbitrary for the map values.
Returns:
A coarbitrary for identity hash maps.

coarbLinkedHashMap

public static <K,V> Coarbitrary<LinkedHashMap<K,V>> coarbLinkedHashMap(Coarbitrary<K> ck,
                                                                       Coarbitrary<V> cv)
A coarbitrary for linked hash maps.

Parameters:
ck - A coarbitrary for the map keys.
cv - A coarbitrary for the map values.
Returns:
A coarbitrary for linked hash maps.

coarbLinkedHashSet

public static <A> Coarbitrary<LinkedHashSet<A>> coarbLinkedHashSet(Coarbitrary<A> c)
A coarbitrary for linked hash sets.

Parameters:
c - A coarbitrary for the elements of the linked hash set.
Returns:
A coarbitrary for linked hash sets.

coarbLinkedList

public static <A> Coarbitrary<LinkedList<A>> coarbLinkedList(Coarbitrary<A> c)
A coarbitrary for linked lists.

Parameters:
c - A coarbitrary for the elements of the linked list.
Returns:
A coarbitrary for linked lists.

coarbPriorityQueue

public static <A> Coarbitrary<PriorityQueue<A>> coarbPriorityQueue(Coarbitrary<A> c)
A coarbitrary for priority queues.

Parameters:
c - A coarbitrary for the elements of the priority queue.
Returns:
A coarbitrary for priority queues.

coarbStack

public static <A> Coarbitrary<Stack<A>> coarbStack(Coarbitrary<A> c)
A coarbitrary for stacks.

Parameters:
c - A coarbitrary for the elements of the stack.
Returns:
A coarbitrary for stacks.

coarbTreeMap

public static <K,V> Coarbitrary<TreeMap<K,V>> coarbTreeMap(Coarbitrary<K> ck,
                                                           Coarbitrary<V> cv)
A coarbitrary for tree maps.

Parameters:
ck - A coarbitrary for the map keys.
cv - A coarbitrary for the map values.
Returns:
A coarbitrary for tree maps.

coarbTreeSet

public static <A> Coarbitrary<TreeSet<A>> coarbTreeSet(Coarbitrary<A> c)
A coarbitrary for tree sets.

Parameters:
c - A coarbitrary for the elements of the tree set.
Returns:
A coarbitrary for tree sets.

coarbVector

public static <A> Coarbitrary<Vector<A>> coarbVector(Coarbitrary<A> c)
A coarbitrary for vectors.

Parameters:
c - A coarbitrary for the elements of the vector.
Returns:
A coarbitrary for vectors.

coarbWeakHashMap

public static <K,V> Coarbitrary<WeakHashMap<K,V>> coarbWeakHashMap(Coarbitrary<K> ck,
                                                                   Coarbitrary<V> cv)
A coarbitrary for weak hash maps.

Parameters:
ck - A coarbitrary for the map keys.
cv - A coarbitrary for the map values.
Returns:
A coarbitrary for weak hash maps.

coarbArrayBlockingQueue

public static <A> Coarbitrary<ArrayBlockingQueue<A>> coarbArrayBlockingQueue(Coarbitrary<A> c)
A coarbitrary for array blocking queues.

Parameters:
c - A coarbitrary for the elements of the array blocking queue.
Returns:
A coarbitrary for array blocking queues.

coarbConcurrentHashMap

public static <K,V> Coarbitrary<ConcurrentHashMap<K,V>> coarbConcurrentHashMap(Coarbitrary<K> ck,
                                                                               Coarbitrary<V> cv)
A coarbitrary for concurrent hash maps.

Parameters:
ck - A coarbitrary for the map keys.
cv - A coarbitrary for the map values.
Returns:
A coarbitrary for concurrent hash maps.

coarbConcurrentLinkedQueue

public static <A> Coarbitrary<ConcurrentLinkedQueue<A>> coarbConcurrentLinkedQueue(Coarbitrary<A> c)
A coarbitrary for concurrent linked queues.

Parameters:
c - A coarbitrary for the elements of the concurrent linked queue.
Returns:
A coarbitrary for concurrent linked queues.

coarbCopyOnWriteArrayList

public static <A> Coarbitrary<CopyOnWriteArrayList<A>> coarbCopyOnWriteArrayList(Coarbitrary<A> c)
A coarbitrary for copy-on-write array lists.

Parameters:
c - A coarbitrary for the elements of the copy-on-write array list.
Returns:
A coarbitrary for copy-on-write array lists.

coarbCopyOnWriteArraySet

public static <A> Coarbitrary<CopyOnWriteArraySet<A>> coarbCopyOnWriteArraySet(Coarbitrary<A> c)
A coarbitrary for copy-on-write array sets.

Parameters:
c - A coarbitrary for the elements of the copy-on-write array set.
Returns:
A coarbitrary for copy-on-write array sets.

coarbDelayQueue

public static <A extends Delayed> Coarbitrary<DelayQueue<A>> coarbDelayQueue(Coarbitrary<A> c)
A coarbitrary for delay queues.

Parameters:
c - A coarbitrary for the elements of the delay queue.
Returns:
A coarbitrary for delay queues.

coarbLinkedBlockingQueue

public static <A> Coarbitrary<LinkedBlockingQueue<A>> coarbLinkedBlockingQueue(Coarbitrary<A> c)
A coarbitrary for linked blocking queues.

Parameters:
c - A coarbitrary for the elements of the linked blocking queue.
Returns:
A coarbitrary for linked blocking queues.

coarbPriorityBlockingQueue

public static <A> Coarbitrary<PriorityBlockingQueue<A>> coarbPriorityBlockingQueue(Coarbitrary<A> c)
A coarbitrary for priority blocking queues.

Parameters:
c - A coarbitrary for the elements of the priority blocking queue.
Returns:
A coarbitrary for priority blocking queues.

coarbSynchronousQueue

public static <A> Coarbitrary<SynchronousQueue<A>> coarbSynchronousQueue(Coarbitrary<A> c)
A coarbitrary for synchronous queues.

Parameters:
c - A coarbitrary for the elements of the synchronous queue.
Returns:
A coarbitrary for synchronous queues.

coarbP1

public static <A> Coarbitrary<P1<A>> coarbP1(Coarbitrary<A> ca)
A coarbitrary for product-1 values.

Parameters:
ca - A coarbitrary for one of the types over which the product-1 is defined.
Returns:
A coarbitrary for product-1 values.

coarbP2

public static <A,B> Coarbitrary<P2<A,B>> coarbP2(Coarbitrary<A> ca,
                                                 Coarbitrary<B> cb)
A coarbitrary for product-2 values.

Parameters:
ca - A coarbitrary for one of the types over which the product-2 is defined.
cb - A coarbitrary for one of the types over which the product-2 is defined.
Returns:
A coarbitrary for product-2 values.

coarbP3

public static <A,B,C> Coarbitrary<P3<A,B,C>> coarbP3(Coarbitrary<A> ca,
                                                     Coarbitrary<B> cb,
                                                     Coarbitrary<C> cc)
A coarbitrary for product-3 values.

Parameters:
ca - A coarbitrary for one of the types over which the product-3 is defined.
cb - A coarbitrary for one of the types over which the product-3 is defined.
cc - A coarbitrary for one of the types over which the product-3 is defined.
Returns:
A coarbitrary for product-3 values.

coarbP4

public static <A,B,C,D> Coarbitrary<P4<A,B,C,D>> coarbP4(Coarbitrary<A> ca,
                                                         Coarbitrary<B> cb,
                                                         Coarbitrary<C> cc,
                                                         Coarbitrary<D> cd)
A coarbitrary for product-4 values.

Parameters:
ca - A coarbitrary for one of the types over which the product-4 is defined.
cb - A coarbitrary for one of the types over which the product-4 is defined.
cc - A coarbitrary for one of the types over which the product-4 is defined.
cd - A coarbitrary for one of the types over which the product-4 is defined.
Returns:
A coarbitrary for product-4 values.

coarbP5

public static <A,B,C,D,E> Coarbitrary<P5<A,B,C,D,E>> coarbP5(Coarbitrary<A> ca,
                                                             Coarbitrary<B> cb,
                                                             Coarbitrary<C> cc,
                                                             Coarbitrary<D> cd,
                                                             Coarbitrary<E> ce)
A coarbitrary for product-5 values.

Parameters:
ca - A coarbitrary for one of the types over which the product-5 is defined.
cb - A coarbitrary for one of the types over which the product-5 is defined.
cc - A coarbitrary for one of the types over which the product-5 is defined.
cd - A coarbitrary for one of the types over which the product-5 is defined.
ce - A coarbitrary for one of the types over which the product-5 is defined.
Returns:
A coarbitrary for product-5 values.

coarbP6

public static <A,B,C,D,E,F$> Coarbitrary<P6<A,B,C,D,E,F$>> coarbP6(Coarbitrary<A> ca,
                                                                   Coarbitrary<B> cb,
                                                                   Coarbitrary<C> cc,
                                                                   Coarbitrary<D> cd,
                                                                   Coarbitrary<E> ce,
                                                                   Coarbitrary<F$> cf)
A coarbitrary for product-6 values.

Parameters:
ca - A coarbitrary for one of the types over which the product-6 is defined.
cb - A coarbitrary for one of the types over which the product-6 is defined.
cc - A coarbitrary for one of the types over which the product-6 is defined.
cd - A coarbitrary for one of the types over which the product-6 is defined.
ce - A coarbitrary for one of the types over which the product-6 is defined.
cf - A coarbitrary for one of the types over which the product-6 is defined.
Returns:
A coarbitrary for product-6 values.

coarbP7

public static <A,B,C,D,E,F$,G> Coarbitrary<P7<A,B,C,D,E,F$,G>> coarbP7(Coarbitrary<A> ca,
                                                                       Coarbitrary<B> cb,
                                                                       Coarbitrary<C> cc,
                                                                       Coarbitrary<D> cd,
                                                                       Coarbitrary<E> ce,
                                                                       Coarbitrary<F$> cf,
                                                                       Coarbitrary<G> cg)
A coarbitrary for product-7 values.

Parameters:
ca - A coarbitrary for one of the types over which the product-7 is defined.
cb - A coarbitrary for one of the types over which the product-7 is defined.
cc - A coarbitrary for one of the types over which the product-7 is defined.
cd - A coarbitrary for one of the types over which the product-7 is defined.
ce - A coarbitrary for one of the types over which the product-7 is defined.
cf - A coarbitrary for one of the types over which the product-7 is defined.
cg - A coarbitrary for one of the types over which the product-7 is defined.
Returns:
A coarbitrary for product-7 values.

coarbP8

public static <A,B,C,D,E,F$,G,H> Coarbitrary<P8<A,B,C,D,E,F$,G,H>> coarbP8(Coarbitrary<A> ca,
                                                                           Coarbitrary<B> cb,
                                                                           Coarbitrary<C> cc,
                                                                           Coarbitrary<D> cd,
                                                                           Coarbitrary<E> ce,
                                                                           Coarbitrary<F$> cf,
                                                                           Coarbitrary<G> cg,
                                                                           Coarbitrary<H> ch)
A coarbitrary for product-8 values.

Parameters:
ca - A coarbitrary for one of the types over which the product-8 is defined.
cb - A coarbitrary for one of the types over which the product-8 is defined.
cc - A coarbitrary for one of the types over which the product-8 is defined.
cd - A coarbitrary for one of the types over which the product-8 is defined.
ce - A coarbitrary for one of the types over which the product-8 is defined.
cf - A coarbitrary for one of the types over which the product-8 is defined.
cg - A coarbitrary for one of the types over which the product-8 is defined.
ch - A coarbitrary for one of the types over which the product-8 is defined.
Returns:
A coarbitrary for product-8 values.

Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg

This software is released under an open source BSD licence.