org.apache.tiles.api

## Class Expression

- java.lang.Object
- - org.apache.tiles.api.Expression

-     public class Expression
      extends Object

  It is an expression, along with the expression language (e.g. EL, MVEL, OGNL) it is expressed with.
  Since:
    2.2.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Expression(Expression toCopy)` Copy constructor.
    `Expression(String expression)` Constructor, using the default (i.e.
    `Expression(String expression, String language)` Constructor.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Expression` | `createExpression(String expression, String language)` Creates an Expression object from the expression and its language.
    `static Expression` | `createExpressionFromDescribedExpression(String describedExpression)` Creates an Expression object from a string in the form `LANGUAGE:EXPRESSION`.
    `boolean` | `equals(Object obj)`
    `String` | `getExpression()` Returns the expression string.
    `String` | `getLanguage()` Returns the language in which the expression is expressed.
    `int` | `hashCode()`
    `String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Expression

          public Expression(String expression,
                            String language)

      Constructor.
      Parameters:
        `expression` - The expression itself.
        `language` - The language of the expression.
      Since:
        2.2.0

    - #### Expression

          public Expression(String expression)

      Constructor, using the default (i.e. `null`) language.
      Parameters:
        `expression` - The expression itself.
      Since:
        2.2.0

    - #### Expression

          public Expression(Expression toCopy)

      Copy constructor.
      Parameters:
        `toCopy` - The expression to copy.
      Since:
        2.2.0

  - ### Method Detail

    - #### createExpressionFromDescribedExpression

          public static Expression createExpressionFromDescribedExpression(String describedExpression)

      Creates an Expression object from a string in the form `LANGUAGE:EXPRESSION`.
      Parameters:
        `describedExpression` - The expression in the form `LANGUAGE:EXPRESSION`. The LANGUAGE part should be expressed only with letters and numbers.
      Returns:
        The created object, or `null` if the expression is null.
      Since:
        2.2.0

    - #### createExpression

          public static Expression createExpression(String expression,
                                                    String language)

      Creates an Expression object from the expression and its language.
      Parameters:
        `expression` - The expression itself.
        `language` - The language of the expression.
      Returns:
        The created object, or `null` if the expression is null.
      Since:
        2.2.0

    - #### getExpression

          public String getExpression()

      Returns the expression string.
      Returns:
        The expression itself.
      Since:
        2.2.0

    - #### getLanguage

          public String getLanguage()

      Returns the language in which the expression is expressed.
      Returns:
        The expression language.
      Since:
        2.2.0

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.