uk.co.jemos.podam.test.dto
Class SingletonWithParametersInStaticFactoryPojo
java.lang.Object
uk.co.jemos.podam.test.dto.SingletonWithParametersInStaticFactoryPojo
- All Implemented Interfaces:
- Serializable
public class SingletonWithParametersInStaticFactoryPojo
- extends Object
- implements Serializable
A POJO to test a Singleton-like scenario where the public static Singleton
method contains parameters.
- Author:
- mtedone
- See Also:
- Serialized Form
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
createDate
private final Calendar createDate
pojoList
private final List<OneDimensionalTestPojo> pojoList
pojoMap
private final Map<String,OneDimensionalTestPojo> pojoMap
firstName
private final String firstName
singleton
private static SingletonWithParametersInStaticFactoryPojo singleton
SingletonWithParametersInStaticFactoryPojo
private SingletonWithParametersInStaticFactoryPojo(Calendar createDate,
List<OneDimensionalTestPojo> pojoList,
Map<String,OneDimensionalTestPojo> pojoMap,
String firstName)
- A private constructor to enforce the Singleton pattern
- Parameters:
createDate
- The creation datepojoList
- A listpojoMap
- A mapfirstName
- The first name
getInstance
public static SingletonWithParametersInStaticFactoryPojo getInstance(Calendar createDate,
List<OneDimensionalTestPojo> pojoList,
Map<String,OneDimensionalTestPojo> pojoMap,
String firstName)
- Singleton method
- Parameters:
createDate
- The creation datepojoList
- A listpojoMap
- A mapfirstName
- The first name
- Returns:
- a singleton instance of this class
getCreateDate
public Calendar getCreateDate()
- Returns:
- the createDate
getPojoList
public List<OneDimensionalTestPojo> getPojoList()
- Returns:
- the pojoList
getPojoMap
public Map<String,OneDimensionalTestPojo> getPojoMap()
- Returns:
- the pojoMap
getFirstName
public String getFirstName()
- Returns:
- the firstName
toString
public String toString()
- Constructs a
String
with all attributes in name = value
format.
- Overrides:
toString
in class Object
- Returns:
- a
String
representation of this object.
Copyright © 2011. All Rights Reserved.