# Class StatsMode

java.lang.Object
uk.ac.starlink.ttools.mode.StatsMode

All Implemented Interfaces:
  `ProcessingMode`

public class StatsMode extends Object implements ProcessingMode
Processing mode for calculating statistics on a table.

Since:
  16 Mar 2005
Author:
  Mark Taylor (Starlink)

## Constructor Summary

Constructors
Constructor
Description
`StatsMode()`
Default constructor.
`StatsMode(boolean isParallel)`
Constructs an instance with optional parallel processing.

## Method Summary

Modifier and Type
Method
Description
`TableConsumer`
`createConsumer(uk.ac.starlink.task.Environment env)`
Creates a TableConsumer, deriving any additional required configuration from a given environment.
`uk.ac.starlink.task.Parameter<?>[]`
`getAssociatedParameters()`
Returns a list of any parameters which are associated with this mode.
`String`
`getDescription()`
Returns a textual description of this processing mode.

### Methods inherited from class Object

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

## Constructor Details

### StatsMode

public StatsMode()
Default constructor.

### StatsMode

public StatsMode(boolean isParallel)
Constructs an instance with optional parallel processing. Parallel execution can be much faster, but it depends on the underlying data; if the multithreaded execution ends up requesting simultaneous access to many different parts of a mapped file, it can end up being much slower than sequential execution.

Parameters:
  `isParallel` - whether statistics calculations are done using multiple threads

## Method Details

### getAssociatedParameters

public uk.ac.starlink.task.Parameter<?>[] getAssociatedParameters()
Description copied from interface: `ProcessingMode`
Returns a list of any parameters which are associated with this mode.

Specified by:
  `getAssociatedParameters` in interface `ProcessingMode`
Returns:
  parameter list

### getDescription

public String getDescription()
Description copied from interface: `ProcessingMode`
Returns a textual description of this processing mode. This will be included in the user document so should be in XML.

Specified by:
  `getDescription` in interface `ProcessingMode`
Returns:
  textual description of this mode

### createConsumer

public TableConsumer createConsumer(uk.ac.starlink.task.Environment env)
Description copied from interface: `ProcessingMode`
Creates a TableConsumer, deriving any additional required configuration from a given environment.

Specified by:
  `createConsumer` in interface `ProcessingMode`
Parameters:
  `env` - execution environment