org.kuali.rice.core.api.cache
Class CacheKeyUtils

java.lang.Object
  extended by org.kuali.rice.core.api.cache.CacheKeyUtils

public final class CacheKeyUtils
extends Object

This is a utility class that generates cache keys for compound objects.


Method Summary
static
<K extends Comparable<K>>
String
key(Collection<K> col)
          Create a String key value out of a Collection.
static
<K extends Comparable<K>>
String
key(Map<K,?> map)
          Create a String key value out of a Map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

key

public static <K extends Comparable<K>> String key(Map<K,?> map)
Create a String key value out of a Map. The Map should really just contain simple types.

Type Parameters:
K - the map key type
Parameters:
map - the map. if null will return ""
Returns:
the map as a string value

key

public static <K extends Comparable<K>> String key(Collection<K> col)
Create a String key value out of a Collection. The Collection should really just contain simple types.

Type Parameters:
K - the col type
Parameters:
col - the collection. if null will return ""
Returns:
the collection as a string value


Copyright © 2005-2011 The Kuali Foundation. All Rights Reserved.