org.asnlab.asndt.runtime.value
Class ChoiceValue.ChoiceValueConverter

java.lang.Object
  extended by org.asnlab.asndt.runtime.conv.AsnConverter
      extended by org.asnlab.asndt.runtime.conv.ChoiceConverter
          extended by org.asnlab.asndt.runtime.value.ChoiceValue.ChoiceValueConverter
Enclosing class:
ChoiceValue

public static class ChoiceValue.ChoiceValueConverter
extends ChoiceConverter


Nested Class Summary
static class ChoiceValue.ChoiceValueConverter.ChoiceValueConverterConverter
           
 
Field Summary
 
Fields inherited from class org.asnlab.asndt.runtime.conv.ChoiceConverter
alternativeConverters
 
Constructor Summary
ChoiceValue.ChoiceValueConverter()
           
ChoiceValue.ChoiceValueConverter(AsnConverter[] alternativeConverters)
           
 
Method Summary
 java.lang.Object createAlternative(int index, java.lang.Object alternativeObject)
          Given the choice index, and the alternative object, create the choice value object.
 int getAlternativeIndex(java.lang.Object object)
          Given the choice value object, return the choice index.
 java.lang.Object getAlternativeObject(java.lang.Object object)
          Given the choice value object, return the alternative object.
 
Methods inherited from class org.asnlab.asndt.runtime.conv.ChoiceConverter
getAlternativeConverter, setAlternativeConverters
 
Methods inherited from class org.asnlab.asndt.runtime.conv.AsnConverter
convert, convert, convert, convert, createAsnConverterConverter, createAsnConverterType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChoiceValue.ChoiceValueConverter

public ChoiceValue.ChoiceValueConverter()

ChoiceValue.ChoiceValueConverter

public ChoiceValue.ChoiceValueConverter(AsnConverter[] alternativeConverters)
Method Detail

createAlternative

public java.lang.Object createAlternative(int index,
                                          java.lang.Object alternativeObject)
Description copied from class: ChoiceConverter
Given the choice index, and the alternative object, create the choice value object.

Specified by:
createAlternative in class ChoiceConverter
Parameters:
index - The choice index
alternativeObject - The alternative object
Returns:
The new choice value object

getAlternativeIndex

public int getAlternativeIndex(java.lang.Object object)
Description copied from class: ChoiceConverter
Given the choice value object, return the choice index.

Specified by:
getAlternativeIndex in class ChoiceConverter
Parameters:
object - The choice value object
Returns:
The choice index

getAlternativeObject

public java.lang.Object getAlternativeObject(java.lang.Object object)
Description copied from class: ChoiceConverter
Given the choice value object, return the alternative object.

Specified by:
getAlternativeObject in class ChoiceConverter
Parameters:
object - The choice value object
Returns:
The alternative object


Copyright �2009-2012 ASN Lab