Package adams.data.binning
Class BinnableFiles
- java.lang.Object
-
- adams.data.binning.BinnableFiles
-
public class BinnableFiles extends Object
Helper class for binning files.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BinnableFiles.FileGroupExtractor
Allows to extract groups either from full name or from just filename.
-
Constructor Summary
Constructors Constructor Description BinnableFiles()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Binnable<File>>
toBinnableUsingIndex(File[] data)
Turns files into a list of binnables using the array index.static List<Binnable<String>>
toBinnableUsingIndex(String[] data)
Turns strings into a list of binnables using the array index.static File[]
toFileArray(List<Binnable<File>> list)
Turns a binnable list back into a file array.static String[]
toStringArray(List<Binnable<String>> list)
Turns a binnable list back into a string array.
-
-
-
Method Detail
-
toBinnableUsingIndex
public static List<Binnable<String>> toBinnableUsingIndex(String[] data) throws Exception
Turns strings into a list of binnables using the array index.- Parameters:
data
- the strings to convert- Returns:
- the generated list
- Throws:
Exception
- if extraction of index fails
-
toBinnableUsingIndex
public static List<Binnable<File>> toBinnableUsingIndex(File[] data) throws Exception
Turns files into a list of binnables using the array index.- Parameters:
data
- the files to convert- Returns:
- the generated list
- Throws:
Exception
- if extraction of index fails
-
toStringArray
public static String[] toStringArray(List<Binnable<String>> list)
Turns a binnable list back into a string array.- Parameters:
list
- the list to convert- Returns:
- the generated array
-
-