You can use a single HashMap<Key<A,B,C>, Value> where Key is a immutable class that contains the three keys you want to use. Make sure to properly overwrite its equals and hashCode methods.
public class Key<A,B,C> {
private final A a;
private final B b;
private final C c;
public Key (A a, B b, C c) {
this.a = a;
this.b = b;
this.c = c;
}
public boolean equals (Object o) {
if (obj instanceof Key) {
Key<?,?,?> k = (Key<?,?,?>)obj;
return Objects.equal(a, k.a) && Objects.equal(b, k.b) && Objects.equal(c, k.c);
}
return false;
}
public int hashCode() {
return Objects.hashCode(a,b,c);
}
}
--
guava-...@googlegroups.com
Project site: https://github.com/google/guava
This group: http://groups.google.com/group/guava-discuss
This list is for general discussion.
To report an issue: https://github.com/google/guava/issues/new
To get help: http://stackoverflow.com/questions/ask?tags=guava
---
You received this message because you are subscribed to the Google Groups "guava-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to guava-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/guava-discuss/7059615b-3d2d-442e-a5d8-5b0ff3f03070%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/guava-discuss/CAORw%3DcMa9VFfojiDZTYm9bBfjSRE1%2B%3DtLop%2BENnKC5JZRWiA7A%40mail.gmail.com.