java.lang.Object
com.prog3.ipt.Model.CitizenClasses.CitizenEditProfileOriginator
CitizenEditProfileOriginator is a class, created to implement Originator object included into Memento
Method design pattern.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
restore()
Return boolean value true meaning last status about a Citizen is restored or false meaning last status about Citizen isn't restored because it wasn't savedvoid
save()
Add reference to a Citizen object into CitizenEditProfileMemento object to save last status about a Citizenvoid
setCurrentCitizen
(Citizen currentCitizen)
-
Field Details
-
currentCitizen
-
savedStates
-
-
Constructor Details
-
CitizenEditProfileOriginator
public CitizenEditProfileOriginator()
-
-
Method Details
-
setCurrentCitizen
-
getCurrentCitizen
-
save
public void save()Add reference to a Citizen object into CitizenEditProfileMemento object to save last status about a Citizen -
restore
public boolean restore()Return boolean value true meaning last status about a Citizen is restored or false meaning last status about Citizen isn't restored because it wasn't saved- Returns:
- boolean value true or false
-