3 ms·
I've seen a pretty big move in popular libraries to fluent interfaces. It does a pretty good job of getting over the verbosity in Java (at least where the verb
by peeters 14y ago
I've seen a pretty big move in popular libraries to fluent interfaces. It does a pretty good job of getting over the verbosity in Java (at least where the verbosity hurts readability).
Examples like Guava:
Cache<String, User> userCache = CacheBuilder.newBuilder()
.initialCapacity(7)
.expireAfterWrite(20, TimeUnit.MINUTES)
.build();
Or Hamcrest:
assertThat(result, containsString("OK"));
Or Rest-Assured:
expect().statusCode(200).when().get("/user/1");