Memento (design pattern)
E679877
Memento (design pattern) is a behavioral software design pattern that captures and externalizes an object's internal state so it can be restored later without violating encapsulation.
All labels observed (1)
| Label | Occurrences |
|---|---|
| Memento (design pattern) canonical | 3 |
How this entity was disambiguated
This entity first appeared as the object of triple T7665682 — resolving that mention is where its identity was fixed. The disambiguator weighed these candidate entities and picked the highlighted one (or “None”, minting a new entity). This is how homonymy is resolved: the same surface form can point to different entities.
Target entity: Memento (design pattern) Context triple: [Originator, roleInPattern, Memento (design pattern)]
-
A.
Design Patterns: Elements of Reusable Object-Oriented Software
Design Patterns: Elements of Reusable Object-Oriented Software is a seminal software engineering book by the "Gang of Four" that catalogues foundational object-oriented design patterns widely used in software development.
-
B.
Memons
Memons are a Muslim ethnic group originating from the Sindh region of South Asia, known for their mercantile traditions and distinct linguistic and cultural identity.
-
C.
Mnemon
Mnemon is the epithet of the Achaemenid Persian king Artaxerxes II, highlighting his reputation for a strong memory and long reign in the 4th century BCE.
-
D.
Rememory
"Rememory" is a song by the American post-hardcore band Surf, known for its emotive intensity and dynamic, guitar-driven sound.
-
E.
"Apprenticeship Patterns"
"Apprenticeship Patterns" is a software craftsmanship book that offers practical guidance and patterns for developers to grow their skills through apprenticeship-style learning and deliberate practice.
- F. None of above. chosen
- G. Unsure - the case is ambiguous/there is not enough information to decide.
Target entity: Memento (design pattern) Target entity description: Memento (design pattern) is a behavioral software design pattern that captures and externalizes an object's internal state so it can be restored later without violating encapsulation.
-
A.
Design Patterns: Elements of Reusable Object-Oriented Software
Design Patterns: Elements of Reusable Object-Oriented Software is a seminal software engineering book by the "Gang of Four" that catalogues foundational object-oriented design patterns widely used in software development.
-
B.
Memons
Memons are a Muslim ethnic group originating from the Sindh region of South Asia, known for their mercantile traditions and distinct linguistic and cultural identity.
-
C.
Mnemon
Mnemon is the epithet of the Achaemenid Persian king Artaxerxes II, highlighting his reputation for a strong memory and long reign in the 4th century BCE.
-
D.
Rememory
"Rememory" is a song by the American post-hardcore band Surf, known for its emotive intensity and dynamic, guitar-driven sound.
-
E.
"Apprenticeship Patterns"
"Apprenticeship Patterns" is a software craftsmanship book that offers practical guidance and patterns for developers to grow their skills through apprenticeship-style learning and deliberate practice.
- F. None of above. chosen
Statements (47)
| Predicate | Object |
|---|---|
| instanceOf |
behavioral design pattern
ⓘ
software design pattern ⓘ |
| alsoKnownAs | Token ⓘ |
| appliesTo |
objects with complex internal state
ⓘ
systems requiring reversible operations ⓘ |
| benefit |
decouples state storage from state management logic
ⓘ
simplifies Originator’s interface for saving and restoring state ⓘ |
| category | Gang of Four behavioral pattern NERFINISHED ⓘ |
| consequence |
can increase memory usage due to stored states
ⓘ
can increase number of objects created ⓘ |
| definedIn | Design Patterns: Elements of Reusable Object-Oriented Software NERFINISHED ⓘ |
| describedBy | Gang of Four NERFINISHED ⓘ |
| encapsulationLevel |
black-box memento
ⓘ
wide-interface memento ⓘ |
| ensures | Originator’s internal state is not exposed to other objects ⓘ |
| field |
object-oriented programming
ⓘ
software engineering ⓘ |
| hasIntent |
capture and externalize an object’s internal state so it can be restored later
ⓘ
preserve encapsulation while saving and restoring state ⓘ |
| hasParticipant |
Caretaker
NERFINISHED
ⓘ
Memento object ⓘ Originator NERFINISHED ⓘ |
| introducedIn | 1994 ⓘ |
| involvesRole |
Caretaker
NERFINISHED
ⓘ
Memento NERFINISHED ⓘ Originator ⓘ |
| languageAgnostic | true ⓘ |
| preserves | encapsulation ⓘ |
| relatedTo |
Command (design pattern)
NERFINISHED
ⓘ
Prototype (design pattern) NERFINISHED ⓘ State (design pattern) NERFINISHED ⓘ |
| responsibility |
create a memento containing a snapshot of its current internal state
ⓘ
keep track of mementos ⓘ pass mementos back to the Originator for state restoration ⓘ provide state back to the Originator when requested ⓘ request mementos from the Originator ⓘ restore its internal state from a memento ⓘ store the internal state of the Originator ⓘ |
| roleIn |
Memento (design pattern)
NERFINISHED
ⓘ
Memento (design pattern) NERFINISHED ⓘ Memento (design pattern) NERFINISHED ⓘ |
| supports |
rollback of state
ⓘ
state history management ⓘ undo operations ⓘ |
| useCase |
implement checkpoints in games
ⓘ
implement multi-level undo in text editors ⓘ implement transactional rollback in applications ⓘ |
How these facts were elicited
The pipeline generated the facts above by prompting gpt-5.1 with this entity's name + description and the instruction below.
You are a knowledge base construction expert. Given a subject entity and a description of it, return factual statements that you know for the subject as a JSON list of dictionaries(triples), where keys must be "subject", "predicate" and "object". The number of facts may be very high, between 25 to 50 or more, for very popular subjects. For less popular subjects, the number of facts can be very low, like 5 or 10. # Requirements - If you don't know the subject at all, return an empty list. - If the subject is not a named entity, return an empty list. - Include at least one triple where predicate is "instanceOf". - Do not get too wordy. - Separate several objects into multiple triples with one object.
Subject: Memento (design pattern) Description of subject: Memento (design pattern) is a behavioral software design pattern that captures and externalizes an object's internal state so it can be restored later without violating encapsulation.
Referenced by (3)
Full triples — surface form annotated when it differs from this entity's canonical label.