Add Method for Lombard Lists

I am currently replacing all my standard POJOs to use Lombok for all template code.

So far, no problems have arisen, but what I miss in the implementation of lombok is that there are no generated methods for adding a single object to the collection.

Generated Code:

private List<Object> list = new ArrayList<>(); public Object getObject(){..} public void setObject(List<Object> o){..} 

What I want in addition:

 public void addObject(Object o) {..} 

Does anyone know if this will happen soon or if this is not possible?

+7
java lombok
source share
1 answer

This is currently not possible. There is such a proposal, but a low priority (or even rejected).

Actually, I can no longer find him. You can try yourself on the list of releases .

Now I stumbled upon this thread , showing an interesting workaround limited to a single variable.

+4
source share

All Articles