# Class SortOptionsChecker (5.0.3)

    public class SortOptionsChecker

Checks the values of a [com.google.appengine.api.search.SortOptions](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.SortOptions).

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> SortOptionsChecker

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Methods

### checkLimit(int limit)

    public static int checkLimit(int limit)

Checks whether the limit on number of documents to score is between 0 and
the maximum.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `limit` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` the maximum number of documents to score in the search |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | the checked limit |

### checkValid(SearchServicePb.ScorerSpec spec)

    public static SearchServicePb.ScorerSpec checkValid(SearchServicePb.ScorerSpec spec)

Checks the ScorerSpec is valid, specifically checking the limit
on number of documents to score is not too large.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `spec` | `com.google.appengine.api.search.proto.SearchServicePb.ScorerSpec` the ScorerSpec to check |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.appengine.api.search.proto.SearchServicePb.ScorerSpec` | the checked spec |

## Constructors

### SortOptionsChecker()

    public SortOptionsChecker()