Skip to content

Instantly share code, notes, and snippets.

View talawahtech's full-sized avatar

Marc Richards talawahtech

  • Kingston, Jamaica
View GitHub Profile
@raymyers
raymyers / PostalTranslations.java
Created January 18, 2013 20:47
Mapping State/Province names to abbreviations and vice versa for United States and Canada in Java using Google Guava immutable collections. Includes handling for non-standard abbreviations associated with Quebec and Newfoundland.
import java.util.Map;
import java.util.Set;
import com.google.common.base.Objects;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableBiMap;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;