Skip to content

davidmoten/guava-mini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

Optional, Preconditions, Objects, Lists, Sets classes taken from guava

Resources

License

Stars

Watchers

Forks

Packages

No packages published