Class get set question

I’ve created an LED class that has worked well for me upto this point. Now, I have an array of leds and I need to know the state (weather it’s on or off) of a particular led. To do that I’ve added getState() to the class but the method is not correct. Say, for instance, that I have an array of leds and I want to know the state of led[3]. I can, of course, set the state with led[3].setState(true) but how to I get the state?

class Led
{
  boolean state;
  color col, onColour, offColour;
  int ledSize, xpos, ypos;

  Led(int x, int y)
  {
    xpos = x;
    ypos = y;
  }  

  void setState(boolean s)
  {
    state = s;
  }

  boolean getState(Led) // this is not correct.
  {
    return state;
  }

No need to give any arguments to the get method:

Led leds[] = new Led[5];


void setup()
{
  for (int i=0; i<5; i++) {
    leds[i] = new Led(i*10, 20);
  }
  
  leds[2].setState(true);

  println(leds[2].getState());

  exit();
}


class Led
{
  boolean state;
  color col, onColour, offColour;
  int ledSize, xpos, ypos;

  Led(int x, int y)
  {
    xpos = x;
    ypos = y;
  }  

  void setState(boolean s)
  {
    state = s;
  }

  boolean getState()
  {
    return state;
  }
}

Thank you raron for your quick reply and, of course, you’re correct. I thought the error was in the class but it’s elsewhere. I should be able to track it down with the excellent debugger.