ilog.rules.brl.translation.codegen

Class IlrIRLNumberValueTranslator

  • java.lang.Object
    • ilog.rules.brl.translation.codegen.IlrIRLNumberValueTranslator
  • All Implemented Interfaces:
    IlrValueTranslator, IlrValueTranslatorExtension, ilog.rules.brl.translation.codegen.IlrValueTranslatorExtension2


    public class IlrIRLNumberValueTranslator
    extends java.lang.Object
    implements ilog.rules.brl.translation.codegen.IlrValueTranslatorExtension2
    This class is intended to be used to translate numerical literal values to IRL.
    • Method Detail

      • translateValue

        public java.lang.String translateValue(java.lang.String value,
                                      IlrConcept concept,
                                      IlrSyntaxTree.Node node,
                                      IlrVocabulary vocabulary)
        Description copied from interface: IlrValueTranslatorExtension
        Generates IRL code from a value string.
        Parameters:
        value - The string representing the value, as it is saved in the abstract syntax tree.
        concept - The concept.
        node - The node from the AST, corresponding to the value to translate (may be null when called from legacy code).
        vocabulary - The vocabulary.
        Returns:
        The IRL code generated for that value.
      • translateValue

        public java.lang.String translateValue(java.lang.String value,
                                      IlrConcept concept,
                                      IlrVocabulary vocabulary)
        If the value contains a dot, then force it to be a double. Otherwise, IRL would interpret it as a float.
        Parameters:
        value - The string representing the value, as it is saved in the abstract syntax tree.
        concept - The concept.
        vocabulary - The vocabulary.
        Returns:
        The IRL code generated for that value.

© Copyright IBM Corp. 1987, 2017