private static List<Integer> testArray(String label, int dateToAdd, boolean increase) {
    JAMonBufferListener jbl = (JAMonBufferListener) JAMonListenerFactory.get(label);
    BufferList bl = jbl.getBufferList();

    Calendar cal = new GregorianCalendar();
    if (increase) {
      for (int i = 1, j = -50; i <= 100; i++, j++) {
        cal.setTime(new Date());
        cal.add(dateToAdd, j);
        bl.addRow(new Object[] {"label" + i, new Integer(i), "Active" + i, cal.getTime()});
      }

    } else {
      for (int i = 100, j = 50; i >= 1; i--, j--) {
        cal.setTime(new Date());
        cal.add(dateToAdd, j);
        bl.addRow(new Object[] {"label" + i, new Integer(i), "Active" + i, cal.getTime()});
      }
    }

    // firstVal will be under date threshold, and secondVal will exceed it.
    int firstVal = -5;
    int secondVal = -10;

    if (dateToAdd == Calendar.HOUR_OF_DAY) {
      firstVal = -12;
      secondVal = -36;
    }

    cal.setTime(new Date());
    cal.add(dateToAdd, firstVal);
    bl.addRow(new Object[] {"label", new Integer(1000), "Active", cal.getTime()});

    cal.setTime(new Date());
    cal.add(dateToAdd, firstVal);
    bl.addRow(new Object[] {"label", new Integer(-1000), "Active", cal.getTime()});

    cal.setTime(new Date());
    cal.add(dateToAdd, secondVal);
    bl.addRow(new Object[] {"label", new Integer(1100), "Active", cal.getTime()});

    cal.setTime(new Date());
    cal.add(dateToAdd, secondVal);
    bl.addRow(new Object[] {"label", new Integer(-1100), "Active", cal.getTime()});

    return grabIntegers(bl.getData());
  }
 public boolean hasData() {
   return list.hasData();
 }
 public boolean isEmpty() {
   return list.isEmpty();
 }
 public int getRowCount() {
   return list.getRowCount();
 }
 /** Make a copy of this instance */
 public JAMonListener copy() {
   return new JAMonBufferListener(getName(), list.copy());
 }
 /** Add a row to the buffer */
 public void addRow(Object[] row) {
   list.addRow(row);
 }
 /** Add a row to the buffer */
 public void addRow(ToArray row) {
   list.addRow(row);
 }
 /** When this event is fired the monitor will be added to the rolling buffer */
 public void processEvent(Monitor mon) {
   list.addRow(mon.getJAMonDetailRow());
 }