mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 12:58:37 +00:00
5cf2fe009b
* Use lombok, reformat, and optimize the code * Fix merge conflicts and some sonar issues Co-authored-by: va1m <va1m@email.com>
layout, title, folder, permalink, categories, tags
| layout | title | folder | permalink | categories | tags | |
|---|---|---|---|---|---|---|
| pattern | Marker Interface | marker | /patterns/marker/ | Structural |
|
Intent
Using empty interfaces as markers to distinguish special treated objects.
Class diagram
Applicability
Use the Marker Interface pattern when
- you want to identify the special objects from normal objects (to treat them differently)
- you want to mark that some object is available for certain sort of operations
