jp.bitmeister.asn1.type
Class NamedNumberMap<T extends java.lang.Number & java.lang.Comparable<T>>

java.lang.Object
  extended by jp.bitmeister.asn1.type.NamedNumberMap<T>

public abstract class NamedNumberMap<T extends java.lang.Number & java.lang.Comparable<T>>
extends java.lang.Object

Contains values and identifiers of enumerations related to ASN.1 'INTEGER' and 'ENUMERATED' types.

Author:
WATANABE, Jun.
See Also:
AbstractInteger

Constructor Summary
NamedNumberMap()
           
 
Method Summary
abstract  T getKeyValue(java.lang.reflect.Field f)
          Returns key value that defined by the enumeration field.
 java.util.Map<T,java.lang.String> getNamedNumberMap(java.lang.Class<? extends AbstractInteger<T>> type)
          Returns the map of enumerations related to the type.
 void putEmptyMap(java.lang.Class<? extends AbstractInteger<T>> type)
          Put an empty enumeration map to namedNumberMaps.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedNumberMap

public NamedNumberMap()
Method Detail

putEmptyMap

public void putEmptyMap(java.lang.Class<? extends AbstractInteger<T>> type)
Put an empty enumeration map to namedNumberMaps.

Parameters:
type - The key type.

getNamedNumberMap

public java.util.Map<T,java.lang.String> getNamedNumberMap(java.lang.Class<? extends AbstractInteger<T>> type)
Returns the map of enumerations related to the type. The Map maps value to identifier string.

Parameters:
type - the Type.
Returns:
The map of enumerations.

getKeyValue

public abstract T getKeyValue(java.lang.reflect.Field f)
Returns key value that defined by the enumeration field.

Parameters:
f - The enumeration field.
Returns:
The key value.


Copyright © 2012 BitMeister Inc. All Rights Reserved.