java.lang.Object
com.prog3.ipt.Model.CitizenClasses.CitizenEditProfileMemento
CitizenEditProfileMemento is a class, created to implement Memento object included into Memento Method
design pattern.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a reference to a Citizen into a LinkedListobject private LinkedList<Citizen>
Returns a LinkedListobject Returns a Citizen object or null if linked list is empty
-
Field Details
-
citizensData
-
-
Constructor Details
-
CitizenEditProfileMemento
public CitizenEditProfileMemento()
-
-
Method Details
-
addState
Add a reference to a Citizen into a LinkedListobject - Parameters:
newCitizen
- Object which represents data of one of the citizens registered into system
-
getCitizensData
Returns a LinkedListobject - Returns:
- A reference to a LinkedList
object
-
getLastCitizenData
Returns a Citizen object or null if linked list is empty- Returns:
- references to a Citizen object or null
-