All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.meanbean.factories.collections.LinkedHashSetFactory Maven / Gradle / Ivy

Go to download

Mean Bean is an open source Java test library that tests equals and hashCode contract compliance, as well as JavaBean/POJO getter and setter methods.

There is a newer version: 2.0.3
Show newest version
package org.meanbean.factories.collections;

import java.util.LinkedHashSet;
import java.util.Set;

import org.meanbean.lang.Factory;
import org.meanbean.util.RandomValueGenerator;

/**
 * Factory that creates random LinkedHashSets of objects of the specified type.
 * 
 * @param 
 *            The data type of the object this Factory creates Sets of.
 */
public class LinkedHashSetFactory extends SetFactoryBase {

	/** Unique version ID of this Serializable class. */
	private static final long serialVersionUID = 1L;

	/**
	 * Construct a new LinkedHashSet object Factory.
	 * 
	 * @param randomValueGenerator
	 *            A random value generator used by the Factory to generate random values.
	 * @param itemFactory
	 *            Factory used to create each Set item.
	 */
	public LinkedHashSetFactory(RandomValueGenerator randomValueGenerator, Factory itemFactory) {
		super(randomValueGenerator, itemFactory);
	}

	/**
	 * Create a new concrete Set instance that this Factory will return populated.
	 * 
	 * @return A concrete Set of the type created by this Factory.
	 */
	@Override
	protected Set createSet() {
		return new LinkedHashSet();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy