Lists

Special purpose implementations of java.util.List

License

License

MIT
GroupId

GroupId

com.github.marschall
ArtifactId

ArtifactId

lists
Last Version

Last Version

1.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

Lists
Special purpose implementations of java.util.List
Project URL

Project URL

https://github.com/marschall/lists
Source Code Management

Source Code Management

https://github.com/marschall/lists

Download lists

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.marschall/lists/ -->
<dependency>
    <groupId>com.github.marschall</groupId>
    <artifactId>lists</artifactId>
    <version>1.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.marschall/lists/
implementation 'com.github.marschall:lists:1.2.0'
// https://jarcasting.com/artifacts/com.github.marschall/lists/
implementation ("com.github.marschall:lists:1.2.0")
'com.github.marschall:lists:jar:1.2.0'
<dependency org="com.github.marschall" name="lists" rev="1.2.0">
  <artifact name="lists" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.marschall', module='lists', version='1.2.0')
)
libraryDependencies += "com.github.marschall" % "lists" % "1.2.0"
[com.github.marschall/lists "1.2.0"]

Dependencies

compile (1)

Group / Artifact Type Version
com.google.code.findbugs : jsr305 Optional jar 3.0.1

test (3)

Group / Artifact Type Version
junit : junit jar 4.12
org.hamcrest : hamcrest-junit jar 2.0.0.0
com.github.marschall : junit-lambda jar 0.3.0

Project Modules

There are no modules declared in this project.

Lists Build Status Maven Central Javadocs

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.

Versions

Version
1.2.0
1.1.0
1.0.0