Sorting ArrayList of Objects

i’ve created these lists in order to build the time series graphics and find each object max values. it’s used int the buidData and buidGraph functions
gr
don’t know if it’s redundant, but i’m acessing them

void buildGraph() {
    pg.beginDraw();
    pg.background(32);
    pg.noFill();

    //drawGrid
    for (int i=0; i<cols; i++) {
      float x=i*colW;
      pg.strokeWeight(1);
      pg.stroke(64);
      pg.line(x, 0, x, graphH);
      pg.fill(200);
      pg.noStroke();
      pg.textSize(8);
      pg.text(tSs.get(i), x, graphH);
    }

    //newCases
    pg.beginShape();
    pg.noFill();
    pg.strokeWeight(2);
    pg.stroke(#FF0000);

    for (int i=0; i<cols; i++) {
      float x=i*colW;
      int y=int(map(nCs.get(i), 0, maxNC, graphH, 0));
      pg.vertex(x, y);
    }
    pg.endShape();

    //totalCases
    pg.beginShape();
    pg.noFill();
    pg.stroke(#00FF00);
    for (int i=0; i<cols; i++) {
      float x=i*colW;
      int y=int(map(tCs.get(i), 0, maxTC, graphH, 0));
      pg.vertex(x, y);
    }
    pg.endShape();

    //numDeaths
    if (maxD>0) {
      pg.beginShape();
      pg.noFill();
      pg.stroke(#00FFFF);
      for (int i=0; i<cols; i++) {
        float x=i*colW;
        int y=int(map(nDs.get(i), 0, maxD, graphH, 0));
        pg.vertex(x, y);
      }
      pg.endShape();
    }
    pg.endDraw();
  }