Below follows an example that show how to get the sum total of all attributes contained in a collection. Example … More
Tag: java8
Java + Javascript : How to take a user location by browser ?
In this example when the user clicks anywhere inside this form his location will be obtained by the javascript function. … More
Java 8 : How to sort a collection with Streams?
For do this you can use : .stream().sorted(new Comparator<MyObject>() { @Override public int compare(MyObject o1, MyObject o2) { return o1.getId().compareTo(o2.getId()); … More
Java 8 : How to stop a foreach process when you are using Streams ?
For do this you can use : anyMatch(conditional) The anyMatch will make the interaction until take a conditional return equals … More
Java 8 : How to do grouping data using Stream API ?
When we have a list of objects and we want to group them by an attribute is easier now. In … More
Java8 : How to filter data from a collection in Java 8 ? #Stream #Filters
Stream has been added in the new API ‘s Java 8 to help you work with collections. Here’s a simple … More
Primefaces : How to create a autocomplete component that save new objects when don’t find it ?
This code is a autocomplete component and works in this way : User try to find some example with part … More
[Java 8] – Lambdas expressions
Why should you care about this? It’s better to programming, it resolves the problems in a easy way, it easy … More