View on GitHub

AutomaticCSV

An open source library to automatically generate ArrayLists of Plain Old Java Objects for importing, sorting, and filtering data.

Maven Central License: MIT

Features

Getting Started

Add the AutomaticCSV dependancy to your Gradle or Maven Project. (Maven Central)

  //Gradle
  implementation 'io.github.jbsooter:AutomaticCSV:0.1.4'

Create a new AutoReadCSV object and read in your file as an ArrayList of the top-level Object class.

AutoReadCSV rCSV = new AutoReadCSV(new URL("https://raw.githubusercontent.com/jbsooter/AutomaticCSV/2121390239d2e3b4e2dd19045cb06d018e53fb83/data/menu.csv"),"Menu.csv");
//AutoReadCSV rCSV = new AutoReadCSV("/path/to/csv"); //Local CSV syntax
ArrayList<Object> csvList = rCSV.readCSV();

Run your program. Now, swap out the top-level Object class for the newly generated class, Menu.

ArrayList<Menu> csvList = rCSV.readCSV();

Done!

Further Documentation:

Datatyping and Import Details

Sorting and Filtering