Skip to content

Instantly share code, notes, and snippets.

View wsh's full-sized avatar

Will Hayworth wsh

View GitHub Profile
@wsh
wsh / OptionalMap.java
Last active December 25, 2015 03:38
Break the Map interface to introduce null-safety via Guava's Optional. Does not allow null entries (surprise).
import java.util.Collection;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import com.google.common.base.Optional;
import com.google.common.collect.Maps;
public class OptionalMap<K, V> {
private final Map<K, V> map;
@wsh
wsh / keybase.md
Created August 2, 2016 23:23
keybase proof

Keybase proof

I hereby claim:

  • I am wsh on github.
  • I am wsh (https://keybase.io/wsh) on keybase.
  • I have a public key ASBOeHd55Uy-7WPwNdthF_FSbTxZy2AelNiRSy79KMyzkwo

To claim this, I am signing this object: