This commit is contained in:
Ilkka Seppälä committed 2019-12-13 21:09:28 +02:00
1 parent 0335c61512
commit b2b1ba95eb
127 files changed
+282 -450

No files matched your search

+1 -2
View File
@@ -5,9 +5,7 @@ folder: interpreter
permalink: /patterns/interpreter/
categories: Behavioral
tags:
- Java
- Gang Of Four
- Difficulty-Intermediate
---
## Intent
@@ -27,6 +25,7 @@ trees. The Interpreter pattern works best when
* efficiency is not a critical concern. The most efficient interpreters are usually not implemented by interpreting parse trees directly but by first translating them into another form. For example, regular expressions are often transformed into state machines. But even then, the translator can be implemented by the Interpreter pattern, so the pattern is still applicable
## Real world examples
* [java.util.Pattern](http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html)
* [java.text.Normalizer](http://docs.oracle.com/javase/8/docs/api/java/text/Normalizer.html)
* All subclasses of [java.text.Format](http://docs.oracle.com/javase/8/docs/api/java/text/Format.html)