1 package cintoo.messages.context; 2 3 import api.cintoo.messages.context.Context; 4 5 import java.util.Locale; 6 7 /** 8 * Key to use e.g. for caching for contexts. The keys 9 * use a context and a locale for specification. 10 * 11 * @author Stephan J. Schmidt 12 * @version $id$ 13 * @since 1.0 14 */ 15 public class ContextKey { 16 public String key; 17 18 public static long generate(Context context, Locale locale) { 19 return (context.toString() + "-" + locale.toString()).hashCode(); 20 } 21 } 22