yegor256 / cactoos

Object-Oriented Java primitives, as an alternative to Google Guava and Apache Commons
https://www.cactoos.org
MIT License
737 stars 163 forks source link

Joined(Iterable<? extends T> items, T item) #1619

Open yegor256 opened 3 years ago

yegor256 commented 3 years ago

How about we introduce a new ctor Joined(Iterable<? extends T> items, T item), which will add the item to the end of the list. Currently, the existing ctor Joined(T item, Iterable<? extends T> items) prepends the list with a new item. I didn't manage to find how to append it.

victornoel commented 3 years ago

@yegor256 to append it you can use something like: new Joined(items, new IterableOf(item)) but I agree we can indeed add a constructor for this use case. I would generify it by proposing we introduce Joined(Iterable<? extends T> items, T... appended)

victornoel commented 3 years ago

@0crat in

victornoel commented 3 years ago

@0crat in

victornoel commented 3 years ago

@0crat in

william746a commented 9 months ago

I can pick this one up. Seems like a good first contribution. Do you all have contributor guidelines anywhere? Looks like there's a qulice profile that will run a code style check.

victornoel commented 9 months ago

@william7b7d yep, you can make a PR and we will review it. qulice will be executed automatically. If you have doubts about what needs to be done, don't hesitate to ask here first!

william746a commented 9 months ago

Okay got a PR together. Let me know if I missed anything.

https://github.com/yegor256/cactoos/pull/1705