Package mondrian.olap

Class ParameterImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      ParameterImpl​(java.lang.String name, Exp defaultExp, java.lang.String description, Type type)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Calc compile​(ExpCompiler compiler)  
      protected java.lang.Object convert​(java.lang.Object value)  
      static java.lang.Object convertBack​(java.lang.Object value)  
      boolean equals​(java.lang.Object other)
      Returns whether this parameter is equal to another, based upon name, type and value
      java.lang.Object[] getChildren()  
      Exp getDefaultExp()
      Returns the expression which provides the default value for this Parameter.
      java.lang.String getDescription()
      Returns the description of this Parameter.
      java.lang.String getName()
      Returns the name of this Parameter.
      Parameter.Scope getScope()
      Returns the scope where this parameter is defined.
      Type getType()
      Returns the type of this Parameter.
      java.lang.Object getValue()
      Returns the value of this parameter.
      int hashCode()  
      boolean isModifiable()
      Returns whether the parameter can be modified.
      boolean isSet()
      Returns whether the value of this parameter has been set.
      void setDefaultExp​(Exp defaultExp)  
      void setDescription​(java.lang.String description)  
      void setType​(Type type)  
      void setValue​(java.lang.Object value)
      Sets the value of this parameter.
      void unsetValue()
      Unsets the value of this parameter.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ParameterImpl

        public ParameterImpl​(java.lang.String name,
                             Exp defaultExp,
                             java.lang.String description,
                             Type type)
    • Method Detail

      • getScope

        public Parameter.Scope getScope()
        Description copied from interface: Parameter
        Returns the scope where this parameter is defined.
        Specified by:
        getScope in interface Parameter
        Returns:
        Scope of the parameter
      • getType

        public Type getType()
        Description copied from interface: Parameter
        Returns the type of this Parameter.
        Specified by:
        getType in interface Parameter
        Returns:
        Type of the parameter
      • getDefaultExp

        public Exp getDefaultExp()
        Description copied from interface: Parameter
        Returns the expression which provides the default value for this Parameter. Never null.
        Specified by:
        getDefaultExp in interface Parameter
        Returns:
        Default value expression of the parameter
      • getName

        public java.lang.String getName()
        Description copied from interface: Parameter
        Returns the name of this Parameter.
        Specified by:
        getName in interface Parameter
        Returns:
        Name of the parameter
      • getValue

        public java.lang.Object getValue()
        Description copied from interface: Parameter
        Returns the value of this parameter.

        If Parameter.setValue(Object) has not been called, returns the default value of this parameter.

        The type of the value is (depending on the type of the parameter) a String, Number, or Member.

        Specified by:
        getValue in interface Parameter
        Returns:
        The value of this parameter
      • setValue

        public void setValue​(java.lang.Object value)
        Description copied from interface: Parameter
        Sets the value of this parameter.
        Specified by:
        setValue in interface Parameter
        Parameters:
        value - Value of the parameter; must be a String, a Double, or a Member
      • isSet

        public boolean isSet()
        Description copied from interface: Parameter
        Returns whether the value of this parameter has been set.

        If the value has not been set, this parameter will return its default value.

        Setting a parameter to null is not equivalent to unsetting it. To unset a parameter, call Parameter.unsetValue().

        Specified by:
        isSet in interface Parameter
        Returns:
        Whether this parameter has been assigned a value
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: Parameter
        Returns the description of this Parameter.
        Specified by:
        getDescription in interface Parameter
        Returns:
        Description of the parameter
      • getChildren

        public java.lang.Object[] getChildren()
      • equals

        public boolean equals​(java.lang.Object other)
        Returns whether this parameter is equal to another, based upon name, type and value
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • isModifiable

        public boolean isModifiable()
        Returns whether the parameter can be modified.
        Specified by:
        isModifiable in interface Parameter
        Returns:
        Whether parameter is modifiable
      • setDescription

        public void setDescription​(java.lang.String description)
      • setType

        public void setType​(Type type)
      • setDefaultExp

        public void setDefaultExp​(Exp defaultExp)
      • convert

        protected java.lang.Object convert​(java.lang.Object value)
      • convertBack

        public static java.lang.Object convertBack​(java.lang.Object value)