Class ConfigEditorValueRetriever

  • All Implemented Interfaces:
    IDatatypeVisitor

    class ConfigEditorValueRetriever
    extends java.lang.Object
    implements IDatatypeVisitor
    This class is part of the ConfigurationCellEditor.getValue(Object) and converts a given IDecisionVariable to an Object so that the Eclipse editors are able to handle it.
    Author:
    El-Sharkawy
    • Field Detail

      • returnValue

        private java.lang.Object returnValue
    • Constructor Detail

      • ConfigEditorValueRetriever

        ConfigEditorValueRetriever​(IDecisionVariable variable)
        Sole constructor for this class for converting a given IDecisionVariable to an Object so that the Eclipse editors are able to handle it.
        Parameters:
        variable - The to be converted IDecisionVariable.
    • Method Detail

      • getValue

        java.lang.Object getValue()
        Returns the value of the given IDecisionVariable so that it can be used as return value for the ConfigurationCellEditor.getValue(Object) method.
        Returns:
        A value as needed by the Eclipse UI.
      • visitSet

        public void visitSet​(Set set)
        Description copied from interface: IDatatypeVisitor
        Is called by a set data type.
        Specified by:
        visitSet in interface IDatatypeVisitor
        Parameters:
        set - the set instance
      • handleSetAndSequence

        private void handleSetAndSequence​(Container type)
        Sets the returnValue for Container types.
        Parameters:
        type - The Container of the current IDecisionVariable.
      • visitRealType

        public void visitRealType​(RealType type)
        Description copied from interface: IDatatypeVisitor
        Visiting method for visiting a RealType.
        Specified by:
        visitRealType in interface IDatatypeVisitor
        Parameters:
        type - The IDatatype which should be visited.
      • handleSimpleDatatype

        private void handleSimpleDatatype()
        Sets the returnValue for simple datatypes like BasisDatatypes.
      • visitCompoundType

        public void visitCompoundType​(Compound compound)
        Description copied from interface: IDatatypeVisitor
        Visiting method for visiting a Compound.
        Specified by:
        visitCompoundType in interface IDatatypeVisitor
        Parameters:
        compound - The Compound which should be visited.
      • visitEnumType

        public void visitEnumType​(Enum enumType)
        Description copied from interface: IDatatypeVisitor
        Visiting method for visiting a Enum.
        Specified by:
        visitEnumType in interface IDatatypeVisitor
        Parameters:
        enumType - The Enum which should be visited.