com.atlassian.bamboo.utils.map
Class Key<T>

java.lang.Object
  extended by com.atlassian.bamboo.utils.map.Key<T>
Type Parameters:
T -

public final class Key<T>
extends java.lang.Object

Allows type safe retrieval of a value from TypedIdentityMap


Method Summary
<V> V
cast(java.lang.Object value)
          Casts the given object to getValueClass()
static
<T> Key<T>
createKey(java.lang.Class<T> clazz)
          Creates a new Key typed by the given Class
 java.lang.Class<? extends T> getValueClass()
          Gets the Class type used for the Value stored against this key
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createKey

public static <T> Key<T> createKey(java.lang.Class<T> clazz)
Creates a new Key typed by the given Class

Type Parameters:
T -
Parameters:
clazz - type of the value
Returns:
key

getValueClass

public java.lang.Class<? extends T> getValueClass()
Gets the Class type used for the Value stored against this key

Returns:
valueClass

cast

public <V> V cast(java.lang.Object value)
Casts the given object to getValueClass()

Type Parameters:
V -
Parameters:
value -
Returns:
casted value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2011 Atlassian. All Rights Reserved.