Package org.asnlab.asndt.runtime.conv
Class ChoiceConverter
java.lang.Object
org.asnlab.asndt.runtime.conv.AsnConverter
org.asnlab.asndt.runtime.conv.ChoiceConverter
- Direct Known Subclasses:
AbstractChoiceConverter
,ChoiceValue.ChoiceValueConverter
The
ChoiceConverter
can convert
choice value. This class is intent to be extended.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Object
createAlternative
(int index, Object alternativeObject) Given the choice index, and the alternative object, create the choice value object.getAlternativeConverter
(int index) Returns this ChoiceConverter's alternative converters.abstract int
getAlternativeIndex
(Object object) Given the choice value object, return the choice index.abstract Object
getAlternativeObject
(Object object) Given the choice value object, return the alternative object.void
setAlternativeConverters
(AsnConverter[] alternativeConverters) Sets this ChoiceConverter's alternative convertersMethods inherited from class org.asnlab.asndt.runtime.conv.AsnConverter
isAnonymous
-
Field Details
-
alternativeConverters
The alternative converters
-
-
Constructor Details
-
ChoiceConverter
public ChoiceConverter() -
ChoiceConverter
-
-
Method Details
-
setAlternativeConverters
Sets this ChoiceConverter's alternative converters- Parameters:
alternativeConverters
- The alternative converters
-
getAlternativeConverter
Returns this ChoiceConverter's alternative converters.- Parameters:
index
- The index of alternative- Returns:
- The alternative converters of this ChoiceConverter
-
createAlternative
Given the choice index, and the alternative object, create the choice value object.- Parameters:
index
- The choice indexalternativeObject
- The alternative object- Returns:
- The new choice value object
-
getAlternativeIndex
Given the choice value object, return the choice index.- Parameters:
object
- The choice value object- Returns:
- The choice index
-
getAlternativeObject
Given the choice value object, return the alternative object.- Parameters:
object
- The choice value object- Returns:
- The alternative object
-