I am trying to search for a collection type that have the following properties:
- Maintain insertion order
- Don't allow duplicates
- Add one or more elements after another
I could create my own data collection but I wish not to.
After taking a look at all collections available in kotlin I think LinkedHashSet
have almost all of my requirements, however it can't add elements after another or at nth position.
Is there any way to accomplish this with an extension method or any another trick?