# ObservationParameters

The `ObservationParameters` class is used to set filter conditions for the `IntermediateResultReceiver`, so that only intermediate results meeting specific conditions will be called back.

## Definition

*Package:* `com.dynamsoft.core.intermediate_results`

```java
public final class ObservationParameters
```

## Methods

| Method               | Description |
|----------------------|-------------|
| [`setObservedResultUnitTypes`](#setobservedresultunittypes) | Sets the types of intermediate result units that have been observed.|
| [`getObservedResultUnitTypes`](#getobservedresultunittypes) | Gets the types of intermediate result units that have been observed. |
| [`isResultUnitTypeObserved`](#isresultunittypeobserved) | Determines whether the specified result unit type was observed. |
| [`addObservedTask`](#addobservedtask) | Adds observed task name to be notified when relevant results are available. |
| [`removeObservedTask`](#removeobservedtask) | Remove the observed task name so that intermediate results generated by the task are not notified. |
| [`isTaskObserved`](#istaskobserved) | Determines whether the specified task was observed. |
| [`setResultUnitTypesOnlyForInput`](#setresultunittypesonlyforinput) | Sets the types of intermediate result unit that indicates skipping default calculations and replacing with input data units. |
| [`getResultUnitTypesOnlyForInput`](#getresultunittypesonlyforinput) | Gets the types of intermediate result unit that indicates skipping default calculations and replacing with input data units. |
| [`isResultUnitTypeOnlyForInput`](#isresultunittypeonlyforinput) | Determines whether the specified type of intermediate result unit indicates skipping default calculations and replacing with input data units. |

### setObservedResultUnitTypes

Sets the types of intermediate result units that have been observed.

```java
void setObservedResultUnitTypes(long types)
```

**Parameters**

`types` The observed types of intermediate result units. This is a bitwise OR combination of one or more values from the `EnumIntermediateResultUnitType` enumeration.

**See Also**

[EnumIntermediateResultUnitType](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/enum-intermediate-result-unit-type.md)

### getObservedResultUnitTypes

Gets the types of intermediate result units that have been observed.

```java
long getObservedResultUnitTypes()
```

**Return value**

The observed types of intermediate result units. This is a bitwise OR combination of one or more values from the `EnumIntermediateResultUnitType` enumeration.

**See Also**

[EnumIntermediateResultUnitType](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/enum-intermediate-result-unit-type.md)

### isResultUnitTypeObserved

Determines whether the specified result unit type was observed.

```java
boolean isResultUnitTypeObserved(@EnumIntermediateResultUnitType long type)
```

**Parameters**

`type` The type of intermediate result units. This is one of the values of the `EnumIntermediateResultUnitType` enumeration.

**Return value**

Returns a boolean value indicating whether the specified result unit type was observed.

**See Also**

[EnumIntermediateResultUnitType](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/enum-intermediate-result-unit-type.md)

### addObservedTask

Adds observed task name to be notified when relevant results are available.

```java
void addObservedTask(String taskName)
```

**Parameters**

`taskName` The specified task name.

### removeObservedTask

Remove the observed task name so that intermediate results generated by the task are not notified.

```java
void removeObservedTask(String taskName)
```

**Parameters**

`taskName` The specified task name.

### isTaskObserved

Determines whether the specified task was observed.

```java
boolean isTaskObserved(String taskName)
```

**Parameters**

`taskName` The specified task name.

**Return value**

Returns a boolean value indicating whether the specified task was observed.

### setResultUnitTypesOnlyForInput

Sets the types of intermediate result unit that indicates skipping default calculations and replacing with input data units.

```java
void setResultUnitTypesOnlyForInput(long types)
```

**Parameters**

`types` The types of intermediate result units. This is a bitwise OR combination of one or more values from the `EnumIntermediateResultUnitType` enumeration.

**See Also**

[EnumIntermediateResultUnitType](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/enum-intermediate-result-unit-type.md)

### getResultUnitTypesOnlyForInput

Gets the types of intermediate result unit that indicates skipping default calculations and replacing with input data units.

```java
long getResultUnitTypesOnlyForInput()
```

**Return value**

Returns the types of intermediate result units. This is a bitwise OR combination of one or more values from the `EnumIntermediateResultUnitType` enumeration.

**See Also**

[EnumIntermediateResultUnitType](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/enum-intermediate-result-unit-type.md)

### isResultUnitTypeOnlyForInput

Determines whether the specified type of intermediate result unit indicates skipping default calculations and replacing with input data units.

```java
boolean isResultUnitTypeOnlyForInput(@EnumIntermediateResultUnitType long type)
```

**Parameters**

`type` The type of intermediate result unit to check. This is one of the values of the `EnumIntermediateResultUnitType` enumeration.

**Return value**

Returns a boolean value indicating whether the specified type of intermediate result unit indicates skipping default calculations and replacing with input data units.

**See Also**

[EnumIntermediateResultUnitType](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/enum-intermediate-result-unit-type.md)
