Class CollectionGenerator<T>

    • Constructor Detail

      • CollectionGenerator

        public CollectionGenerator​(TypedGenerator<T> wrapped,
                                   int lowerBound,
                                   int upperBound)
        Constructor.
        Parameters:
        wrapped - generator, must not be null
        lowerBound - defines the lower bound of the integer generator that determines the of Collection size
        upperBound - defines the upper bound of the integer generator that determines the of Collection size
    • Method Detail

      • list

        public List<Tlist​(int count)
        Returns a List of the elements provided by the generator
        Parameters:
        count - the number of elements within the list
        Returns:
        a list with a given number of elements.
      • set

        public Set<Tset​(int count)
        Returns a Set of the elements provided by the generator
        Parameters:
        count - the number of elements within the Set. It defines an upper bound of elements, but depending on the elements / the entropy of the generator there may be a lower number of elements.
        Returns:
        a Set with a given number of elements as maximum.
      • sortedSet

        public SortedSet<TsortedSet​(int count)
        Returns a SortedSet of the elements provided by the generator
        Parameters:
        count - the number of elements within the Set. It defines an upper bound of elements, but depending on the elements / the entropy of the generator there may be a lower number of elements.
        Returns:
        a Set with a given number of elements as maximum.
      • set

        public Set<Tset()
        Returns:
        a Set with a random number of elements as maximum.
      • list

        public List<Tlist()
        Returns:
        a List with a random number of elements as maximum.