001package org.unix4j.unix.tail;
002
003import org.unix4j.context.ExecutionContext;
004import org.unix4j.processor.AbstractLineProcessor;
005import org.unix4j.processor.LineProcessor;
006
007/**
008 * Base class for the line processors used by the {@link TailCommand}.
009 */
010abstract class AbstractTailProcessor extends AbstractLineProcessor<TailArguments> {
011        protected final long count;
012
013    public abstract void resetCountersAndFlush();
014
015        public AbstractTailProcessor(TailCommand command, ExecutionContext context, LineProcessor output) {
016                super(command, context, output);
017                final TailArguments args = getArguments();
018                this.count = args.isCountSet() ? args.getCount() : 10;
019        }
020}