uk.co.jemos.podam.test.dto
Class SingletonWithParametersInStaticFactoryPojo

java.lang.Object
  extended by 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

Field Summary
private  Calendar createDate
           
private  String firstName
           
private  List<OneDimensionalTestPojo> pojoList
           
private  Map<String,OneDimensionalTestPojo> pojoMap
           
private static long serialVersionUID
           
private static SingletonWithParametersInStaticFactoryPojo singleton
           
 
Constructor Summary
private SingletonWithParametersInStaticFactoryPojo(Calendar createDate, List<OneDimensionalTestPojo> pojoList, Map<String,OneDimensionalTestPojo> pojoMap, String firstName)
          A private constructor to enforce the Singleton pattern
 
Method Summary
 Calendar getCreateDate()
           
 String getFirstName()
           
static SingletonWithParametersInStaticFactoryPojo getInstance(Calendar createDate, List<OneDimensionalTestPojo> pojoList, Map<String,OneDimensionalTestPojo> pojoMap, String firstName)
          Singleton method
 List<OneDimensionalTestPojo> getPojoList()
           
 Map<String,OneDimensionalTestPojo> getPojoMap()
           
 String toString()
          Constructs a String with all attributes in name = value format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

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 date
pojoList - A list
pojoMap - A map
firstName - The first name
Method Detail

getInstance

public static SingletonWithParametersInStaticFactoryPojo getInstance(Calendar createDate,
                                                                     List<OneDimensionalTestPojo> pojoList,
                                                                     Map<String,OneDimensionalTestPojo> pojoMap,
                                                                     String firstName)
Singleton method

Parameters:
createDate - The creation date
pojoList - A list
pojoMap - A map
firstName - 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.

Jemos 2002 - 2011: All Rights Reserved. Podam runs under the MIT license

Copyright © 2011. All Rights Reserved.