Some popular utilities from Guava repackaged (with different package names but same class names and method names) into a little jar (15K) available on Maven Central.
Compatible with java 8 and later.
Status: on Maven Central
Maven site reports are here including javadoc.
Taken from Guava:
Optional
Objects
:equal
,hashCode
Preconditions
:checkNotNull
,checkArgument
Lists
:newArrayList
Sets
:newHashSet
Non-guava:
Maps
:hashMap
,treeMap
,linkedHashMap
Map<Integer, String> map = Maps.put(1, "hi").put(2, "there").build();
Map<Integer, String> sorted = Maps.treeMap().put(1, "hi").put(2, "there").build();
Map<Integer, String> linked = Maps.linkedHashMap().put(1, "hi").put(2, "there").build();
Map<Integer, String> presized = Maps.hashMap().initialSize(1000).put(1, "hi").put(2, "there").build();
Add this dependency to your pom.xml:
<dependency>
<groupId>com.github.davidmoten</groupId>
<artifactId>guava-mini</artifactId>
<version>VERSION_HERE</version>
</dependency>