public final class


extends Object
   ↳ com.shinobicontrols.advancedcharting.sampling.IndexBatch

Class Overview

A container used by the NthPointSampler class that looks after indices, length pairs used in the sampling process. IndexBatchs are typically used in multi Nth point batch sampling scenarios.

For example, the requirement may be to return the second and fifth data point in every 'block' of ten data points. To achieve this a single IndexBatch is needed with an indices array containing the values two, five and a length value of ten.

Note: For simple Nth point sampling scenarios, for example to sample every second data point in a list of data points, it is not necessary to use the IndexBatch object. Instead one would simply provide a single integer value to the appropriate constructor of the NthPointSampler class.

Similarly, for multi Nth point sampling such as to sample every second and fifth data point in a set of data points, IndexBatchs are not needed. One simply needs to construct a suitable NthPointSampler, passing in an array of integers (in this case values 2, 5) to the appropriate constructor.


Public Constructors
IndexBatch(int[] indices, int length)
Constructs an IndexBatch object with a given indices and length.
Public Methods
boolean equals(Object o)
int hashCode()
Inherited Methods
From class java.lang.Object

Public Constructors

public IndexBatch (int[] indices, int length)

Constructs an IndexBatch object with a given indices and length.

indices the indices of the com.shinobicontrols.charts.DataPoints to include in the sample block, must not be null
length the length of the sample block to use

Public Methods

public boolean equals (Object o)

public int hashCode ()