You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fluentinterface/index.md
+22-8Lines changed: 22 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -3,14 +3,25 @@ layout: pattern
3
3
title: Fluent Interface
4
4
folder: fluentinterface
5
5
permalink: /patterns/fluentinterface/
6
-
categories: Architectural
7
-
tags: Java
6
+
categories: Other
7
+
tags:
8
+
- Java
9
+
- Difficulty-Intermediate
8
10
---
9
11
10
12
**Intent:** A fluent interface provides an easy-readable, flowing interface, that often mimics a domain specific language. Using this pattern results in code that can be read nearly as human language.
11
13
14
+
**Implementation:**
15
+
16
+
A fluent interface can be implemented using any of
17
+
18
+
* Method Chaining - calling a method returns some object on which further methods can be called.
19
+
* Static Factory Methods and Imports
20
+
* Named parameters - can be simulated in Java using static factory methods.
0 commit comments