Class SetGenerator<T extends Set>

Type Parameters:
T - the type of set generated
All Implemented Interfaces:
Gen<T>, Shrink<T>
Direct Known Subclasses:
HashSetGenerator, LinkedHashSetGenerator

public abstract class SetGenerator<T extends Set> extends CollectionGenerator<T>
Base class for generators of Sets.
  • Constructor Details

    • SetGenerator

      protected SetGenerator(Class<T> type)
  • Method Details

    • configure

      public void configure(Size size)
      Description copied from class: CollectionGenerator

      Tells this generator to add elements to the generated collection a number of times within a specified minimum and/or maximum, inclusive, chosen with uniform distribution.

      Note that some kinds of collections disallow duplicates, so the number of elements added may not be equal to the collection's Collection.size().

      Overrides:
      configure in class CollectionGenerator<T extends Set>
      Parameters:
      size - annotation that gives the size constraints