class TimeColumn extends AbstractColumn<TimeColumn, LocalTime> implements CategoricalColumn<LocalTime>,
        TimeFilters,
        TimeFillers<TimeColumn>,
        TimeMapFunctions {

  @Override
  public TimeColumn lag(int n) {
    int srcPos = n >= 0 ? 0 : 0 - n;
    int[] dest = new int[size()];
    int destPos = n <= 0 ? 0 : n;
    int length = n >= 0 ? size() - n : size() + n;

    for (int i = 0; i < size(); i++) {
      dest[i] = TimeColumnType.missingValueIndicator();
    }

    System.arraycopy(data.toIntArray(), srcPos, dest, destPos, length);

    TimeColumn copy = emptyCopy(size());
    copy.data = new IntArrayList(dest);
    copy.setName(name() + " lag(" + n + ")");
    return copy;
  }

  private  TimeColumn(String name, IntArrayList times);
  private  TimeColumn(String name);

}