Package studentrepoloader.model.villecsv.util


package studentrepoloader.model.villecsv.util
Utility classes for filtering, transforming, and projecting lists of ViLLe submission objects.

This package provides fluent-style tools to operate on collections of parsed and mapped submission entries. It is intended for use in CLI pipelines or higher-level coordination logic to assist in selecting subsets of data based on date, ID range, or field content.

Core component:

  • SubmissionQuery – A chainable query object that wraps a list of VilleSubmissions or their subtypes and supports filtering, sorting, and projecting based on getter functions.

Filters include:

  • Date-based inclusion or exclusion based on getTime().
  • ID range filtering based on getID().
  • Field substring containment using arbitrary getter functions.

This package is format-agnostic – it works with any implementation of VilleSubmission, including test objects, mapped objects, or custom subclasses. It enables clean, readable filtering logic like:

     List results = SubmissionQuery.from(subs)
         .filterAfterDate("2025-01-01")
         .filterIdBetween("a", "m")
         .toList();
 

Does not perform I/O or validation – purely operates in-memory on already constructed objects.