Skip to main content

Stephen Colebourne: VALJOs - Value Java Objects

The term "value object" gets confusing in Java circles with various different interpretations. When I think about these I have my own very specific interpretation, which I'm christening VALJOs. What I want to achieve is a set of criteria for well-written value objects in Java today. Although written for today, the criteria have one eye on what value types of the future may look like... The class must be immutable, which implies the final keyword and thread-safety. The class name must be simple and direct, focused on the value...

Community: General