Skip to content

Latest commit

 

History

History
43 lines (34 loc) · 1.72 KB

README.md

File metadata and controls

43 lines (34 loc) · 1.72 KB

guava-mini


Maven Central
codecov
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.

Features

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();

Getting started

Add this dependency to your pom.xml:

<dependency>
  <groupId>com.github.davidmoten</groupId>
  <artifactId>guava-mini</artifactId>
  <version>VERSION_HERE</version>
</dependency>