Bye Manual SQL, Hello Speedment!

Most applications written in Java require some form of data storage. In small applications this is often realized using a primitive JDBC-connection that is queried using ordinary SQL. Larger systems on the other hand often use an Object Relational Mapping...

Equality vs Identity

When storing objects in a Set, it is important that the same object can never be added twice. That is the core definition of a Set. In java, two methods are used to determine whether two referenced objects are the...

Get rid of equals, compare_To and to_String

Have you ever looked at the javadoc of the Object-class in Java? Probably. You tend to end up there every now and then when digging your way down the inheritance tree. One thing you might have noticed is that it...

Definition of the Trait Pattern in Java

In this article I will present the concept of traits and give you a concrete example of how they can be used in Java to achieve less redundancy in your object design. I will begin by presenting a fictional case...

Using Traits in Java 8

In one of my earlier articles I mentioned a programming component called “traits”. These constructs have existed for many years in other programming languages like Scala and PHP, but have only recently been available through default methods in Java. I...