public class SortCSV
extends java.lang.Object
| Constructor and Description |
|---|
SortCSV() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
Given a standard input CSV input where each row has the same number of comma-separated elements of the same String/double/int type sequence,
and optionally given a zero-based column number, print the same CSV lines to standard output sorted according to the zero-based column number.
|
static void |
sort(java.util.ArrayList<java.lang.Object[]> records,
int sortIndex)
Given an ArrayList of Object[] records, each being an array of String/Double/Integer objects parsed from an input CSV line, sort the
ArrayList's Object[] records according to the given 0-based sort column index.
|
public static void main(java.lang.String[] args)
args - args[0] should be a zero-based column number designated for sorting the CSV linespublic static void sort(java.util.ArrayList<java.lang.Object[]> records,
int sortIndex)
records - an ArrayList of Object[] records, each being an array of String/Double/Integer objectssortIndex - the given 0-based sort column index