Skip to main content

All Questions

3 votes
1 answer
5k views

How to handle "conditional fields" in Java?

I've run into several situations where a POJO where whether a field value is meaningful depends on the value of another field. An example, using Lombok (which we try to use to avoid boilerplate): @...
ajb's user avatar
  • 131