com.google.appengine.api.search

## Class FieldExpression.Builder

- java.lang.Object
- - com.google.appengine.api.search.FieldExpression.Builder

- Enclosing class:
    FieldExpression

      public static final class FieldExpression.Builder
      extends java.lang.Object

  A field expression builder. A name and expression must be supplied.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Builder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FieldExpression` | `build()` Builds the FieldExpression.
    `FieldExpression.Builder` | `setExpression(java.lang.String expression)` Sets the expression to evaluate to return in `ScoredDocument`.
    `FieldExpression.Builder` | `setName(java.lang.String name)` Sets the name of the expression.

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

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

- - ### Constructor Detail

    - #### Builder

          public Builder()

  - ### Method Detail

    - #### setName

          public FieldExpression.Builder setName(java.lang.String name)

      Sets the name of the expression. The name must be a valid field name.
      Parameters:
        `name` - the name of the expression
      Returns:
        this Builder
      Throws:
        `java.lang.IllegalArgumentException` - if name is not a valid field name

    - #### setExpression

          public FieldExpression.Builder setExpression(java.lang.String expression)

      Sets the expression to evaluate to return in `ScoredDocument`.
      Parameters:
        `expression` - an expression to evaluate and return in a `ScoredDocument` field
      Returns:
        this Builder
      Throws:
        `java.lang.IllegalArgumentException` - if the expression is not valid

    - #### build

          public FieldExpression build()

      Builds the FieldExpression. An expression and name for the expression must be given.
      Returns:
        the built FieldExpression
      Throws:
        `java.lang.IllegalArgumentException` - if the name is not a valid field name