Articles Tagged ‘functional’
Sunday, December 30th, 2018
It is interesting to see how the Java language evolves over time. One thing that I have always missed is pattern matching in a way similar to languages like Scala.
Now there are different JDK Enhancement Proposals (JEP) aiming at bringing us a little bit closer to pattern matching, especially JEP 325 aka Switch Expressions that are included in the current Java 12 preview or JEP 305 aka Pattern Matching for instanceof.
In the following article, I’d like to demonstrate how to use switch expressions in our applications.
(more…)
Tags: functional, instanceof, java-12, java12, jep-305, jep-325, pattern-matching, switch-expressions
Posted in Java | No Comments »
Sunday, September 27th, 2015
Promises may help us when dealing with asynchronous code and we need to merge, pipe or track the progress and the results of single parts of computation in our applications.
In the following tutorial I’d like to demonstrate a small library, JDeferred that helps us for this specific use case.
(more…)
Tags: asynchronous, deferred, deferredobject, functional, javascript, jdeferred, js, promise, promises
Posted in Java | 3 Comments »
Sunday, September 22nd, 2013
Many articles have been written about JSR 335 aka Lambda Expressions for the JavaTM Programming Language but I like to try new things out for myself and that’s why I’d like to share my snippets here.
(more…)
Tags: closure, collector, filter, functional, java8, lambda, optional, predicate, stream
Posted in Java | No Comments »
Monday, July 16th, 2012
Functional programming is a trending topic these days and a lot of Java programmers are hot for the features that modern functional programming languages might offer.
Waiting for Java 8 and native closure support is a nice thing but for now we’re going to take a look at several Java frameworks that are trying to implement typical structures from those functional languages where possible using the capabilities of the Java language to emulate elements like higher-order-functions, closures, options and others …
(more…)
Tags: closure, commons-collections, funcito, functional, functional programming, functionaljava, guava, Java, lambda, lambdaj, maven, predicate, scala, transformer
Posted in Development, Java, Scala | 4 Comments »
Friday, March 23rd, 2012
Having just returned from the Atlassian Camp 2012 I just toyed around with Java and Scala and wanted to share the following snippet that demonstrates how to mix code from both languages in a Maven project using the maven-scala-plugin.
(more…)
Tags: functional, Java, maven, scala, Snippet, tutorial
Posted in Java, Scala | No Comments »