Lists
![Javadocs](https://camo.githubusercontent.com/5352e609b8f09f6937fa5bd7fdb4831ef815503ce4b09378166b62a2d4a19163/687474703a2f2f7777772e6a617661646f632e696f2f62616467652f636f6d2e6769746875622e6d6172736368616c6c2f6c697374732e737667)
Special purpose implementations of java.util.List
that in the right niche use case can be much more efficient than implementations shipped with the JDK.
<dependency>
<groupId>com.github.marschall</groupId>
<artifactId>lists</artifactId>
<version>1.2.0</version>
</dependency>
The implementations have optimized implementations of java.util.Spliterator
. The implementations support serialization but this has not been optimized.
Currently includes classes:
- SingletonList
- Like Collections.singletonList but mutable
- RepeatingList
- one element repeated several times, immutable
- RepeatingList
- a map function applied to an other list, just a view
- RepeatingList
- a Lisp-style list with a head and a tail
All methods are below 325 byte and should therefore HotSpot should be able to inline them if they are hot.
None of the lists or iterators are fail-fast.