Profile cover photo
Profile photo
Per-Åke Minborg
52 followers
52 followers
About
Per-Åke's posts

Post has attachment
Day 25, Java Holiday Calendar 2016, The Complete Deck
Day 25, Java Holiday Calendar 2016, The Complete Deck Thank you all for following this year's Java Calendar. Here is the complete list with all the articles: 1: Use the @FunctionalInterface Annotation If you want to ensure API users can use lambdas to imple...

Post has attachment
Day 24, Java Holiday Calendar 2016, How many Santas are there - Really?
Day 24, Java Holiday Calendar 2016, How many Santas are there - Really? Today we are going to do some nonsense calculations. Is there a Santa and if yes, how many Stantas can we expect to find in the world? The Assumptions Let us start with some assumptions...

Post has attachment
Day 23, Java Holiday Calendar 2016, Use Mappable Types Instead of Bloated Ones
Day 23, Java Holiday Calendar 2016, Use Mappable Types Instead of Bloated Ones Today's tips is about mappable types. Traditionally we Java developer have relied on inheritance and types with a number of methods to support convenient use of our classes. A tr...

Post has attachment
Day 22, Java Holiday Calendar 2016, Use Enums as Method Parameters
Day 22, Java Holiday Calendar 2016, Use Enums as Method Parameters Today's tips is about using Enums as parameters to indicate method behavior. Let us here the fairy tail of Prince Sort and it will be more apparent why this can be a good thing. Once upon a ...

Post has attachment
Day 21, Java Holiday Calendar 2016, Concatenate Java Streams
Day 21, Java Holiday Calendar 2016, Concatenate Java Streams Today's tip is about concatenating streams. The task of the day is to construct a concatenated stream that lazily consumes a number of underlying streams. So, dumping the content from the various ...

Post has attachment
Day 20, Java Holiday Calendar 2016, Breakout of the Java Heap
Day 20, Java Holiday Calendar 2016, Breakout of the Java Heap Today's tip is about storing things off heap. As we all know, Java will occasionally clean up the heap (i.e. invoke its Garbage Collector or GC for short) and remove objects that are no longer us...

Post has attachment
Day 19, Java Holiday Calendar 2016, Speed up Your Enums
Day 19, Java Holiday Calendar 2016, Speed up Your Enums Today's tips is about Enum performance. A large number of Java programmers think Enums have a very fast method called .values() that returns all the Enums. Heck, it is even an array being returned so i...

Post has attachment
Day 18, Java Holiday Calendar 2016, Easily Create Database Content
Day 18, Easily Create Database Content Today's tips is about creating database content. There are a number of ways to do this, ranging from writing our own entity beans combined with using JDBC directly to fully automating the entire process. Suppose we alr...

Post has attachment
Day 17, Java Holiday Calendar 2016, Parallel Streams in Custom Thread Pools
17. Parallel Streams in Custom Thread Pools Today's tips is about executing parallel streams in custom thread pools. One of the main drivers for developing the Java 8 streams was their ability to abstract away parallelism. In theory, we could take any strea...

Post has attachment
Day 16, Java Holiday Calendar 2016, Hacking Java Classes
16. Hacking the Existing Java Classes Today's tips is about hacking the existing Java classes. But before we start, I would like to issue a disclaimer: I am only showing this to illustrate certain possibilities. This post contains code that  is against best...
Wait while more posts are being loaded