java-design-patterns/marker at master · xiaogithubcode/java-design-patterns · GitHub
Skip to content

Latest commit

 

History

History
 
 

Folders and files

README.md

layout pattern
title Marker Interface
folder marker
permalink /patterns/marker/
categories Other
tags
Java
Difficulty-Beginner

Intent

Using empty interfaces as markers to distinguish special treated objects.

alt text

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

Real world examples

Credits