fuzzydl

## Class DegreeExpression

- java.lang.Object
- - fuzzydl.Degree
  - - fuzzydl.DegreeExpression

-     public class DegreeExpression
      extends Degree

  Degree defined using an expression.
  Author:
    Fernando Bobillo

- - ### Field Summary

    - ### Fields inherited from class fuzzydl.Degree

      `ONE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DegreeExpression(Expression expr)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Expression` | `addToExpression(Expression expr)` Adds the degree to an expression.
    `Inequation` | `createInequalityWithDegreeRHS(Expression expr, char inequationType)` Gets an inequality of the form (expression, type, degree).
    `boolean` | `equals(Degree d)` Checks if two degrees are equal.
    `Expression` | `getExpression()` Gets the expression which defines the degree.
    `boolean` | `isNumberNotOne()` Checks if the degree is a number different than 1.0.
    `boolean` | `isNumberZero()` Checks if the degree is number 0.0.
    `boolean` | `isNumeric()` Checks if the object is a numeric degree.
    `Expression` | `multiplyConstant(java.lang.Double constant)` Multiplies the degree and a real number.
    `Expression` | `subtractFromExpression(Expression expr)` Subtracts the degree to an expression.
    `java.lang.String` | `toString()` Gets the name of the degree.

    - ### Methods inherited from class fuzzydl.Degree

      `getDegree, getDegree, getDegree`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DegreeExpression

          public DegreeExpression(Expression expr)

  - ### Method Detail

    - #### getExpression

          public Expression getExpression()

      Gets the expression which defines the degree.
      Returns:
        Expression which defines the degree.

    - #### createInequalityWithDegreeRHS

          public Inequation createInequalityWithDegreeRHS(Expression expr,
                                                          char inequationType)

      Description copied from class: `Degree`
      Gets an inequality of the form (expression, type, degree).
      Specified by:
        `createInequalityWithDegreeRHS` in class `Degree`
      Parameters:
        `expr` - An expression.
        `inequationType` - A type of inequality.
      Returns:
        An inequality of the form (expression, type, degree).

    - #### toString

          public java.lang.String toString()

      Description copied from class: `Degree`
      Gets the name of the degree.
      Specified by:
        `toString` in class `Degree`
      Returns:
        Name of the degree.

    - #### isNumeric

          public boolean isNumeric()

      Description copied from class: `Degree`
      Checks if the object is a numeric degree.
      Specified by:
        `isNumeric` in class `Degree`
      Returns:
        true if the object is a numeric degree; false otherwise.

    - #### addToExpression

          public Expression addToExpression(Expression expr)

      Description copied from class: `Degree`
      Adds the degree to an expression.
      Specified by:
        `addToExpression` in class `Degree`
      Parameters:
        `expr` - An expression.
      Returns:
        A new expression with the sum.

    - #### subtractFromExpression

          public Expression subtractFromExpression(Expression expr)

      Description copied from class: `Degree`
      Subtracts the degree to an expression.
      Specified by:
        `subtractFromExpression` in class `Degree`
      Parameters:
        `expr` - An expression.
      Returns:
        A new expression with the subtraction expr - this.

    - #### multiplyConstant

          public Expression multiplyConstant(java.lang.Double constant)

      Description copied from class: `Degree`
      Multiplies the degree and a real number.
      Specified by:
        `multiplyConstant` in class `Degree`
      Parameters:
        `constant` - A real number.
      Returns:
        A new expression with the product.

    - #### equals

          public boolean equals(Degree d)

      Description copied from class: `Degree`
      Checks if two degrees are equal.
      Specified by:
        `equals` in class `Degree`
      Parameters:
        `d` - A degree.
      Returns:
        true if the degrees are equal; false otherwise.

    - #### isNumberNotOne

          public boolean isNumberNotOne()

      Description copied from class: `Degree`
      Checks if the degree is a number different than 1.0.
      Returns:
        true if the degree is a number different than 1.0; false otherwise.

    - #### isNumberZero

          public boolean isNumberZero()

      Description copied from class: `Degree`
      Checks if the degree is number 0.0.
      Returns:
        true if the degree is 0.0; false otherwise.