Java List Transform transformContinuouslyVariablesByThreshold(List> data, int index, int threshold)

Here you can find the source of transformContinuouslyVariablesByThreshold(List> data, int index, int threshold)

Description

transform Continuously Variables By Threshold

License

Open Source License

Declaration

private static void transformContinuouslyVariablesByThreshold(List<List<String>> data, int index,
        int threshold) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {

    private static void transformContinuouslyVariablesByThreshold(List<List<String>> data, int index,
            int threshold) {
        for (int i = 1; i < data.size(); i++) {
            List<String> rowData = data.get(i);
            if (Integer.parseInt(rowData.get(index)) <= threshold) {
                rowData.set(index, "<=" + threshold);
            } else {
                rowData.set(index, ">" + threshold);
            }/*from   w w w . ja v a  2s. c  om*/
        }
    }
}

Related

  1. stringToList(final String stringToTransform)
  2. transform(final List l)
  3. transform(List> values)
  4. transformCollectionTOList(Collection collection)
  5. transformIntoAList(String... elements)
  6. transformNumberedPropertiesToList(Properties props)
  7. transformStringListToString(List fileContentAsList)
  8. transformStringToListOfStrings(String line)