Example usage for org.springframework.batch.item.file.transform FieldSet readDouble

List of usage examples for org.springframework.batch.item.file.transform FieldSet readDouble

Introduction

In this page you can find the example usage for org.springframework.batch.item.file.transform FieldSet readDouble.

Prototype

double readDouble(String name);

Source Link

Document

Read the 'double' value from column with given 'name.

Usage

From source file:org.springframework.batch.admin.sample.LeadRandomizer.java

private double[] getMinMax(List<FieldSet> list, int column) {
    double min = 0;
    double max = 0;
    for (FieldSet fieldSet : list) {
        double x = fieldSet.readDouble(column);
        if (x > max)
            max = x;//from www.j  ava  2s .  c om
        if (x < min)
            min = x;
    }
    return new double[] { min, max };
}