package com.menzus.gcj._2012.qualification.c;

import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;

public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
    public CProcessorFactory(String inputFileName) {
	super(inputFileName);
    }

    @Override
    protected InputBlockParser<CInput> createInputBlockParser() {
	return new CInputBlockParser();
    }

    @Override
    protected OutputProducer<CInput, COutputEntry> createOutputProducer() {
	return new COutputProducer();
    }
}

package info.m3o.gcj2012.recyclednumber;

public class ResultUtil {
	MyNumberStringSet testedNumberSet;
	MyNumberStringPairSet recycledNumberSet;

	public ResultUtil() {
		testedNumberSet = new MyNumberStringSet();
		recycledNumberSet = new MyNumberStringPairSet();
		assert (testedNumberSet.isEmpty() == true) : "ResultUtil Constructor Error.";
		assert (recycledNumberSet.isEmpty() == true) : "ResultUtil Constructor Error.";
	}

	public void clearSets() {
		this.testedNumberSet.clear();
		this.recycledNumberSet.clear();
	}

	public boolean isTested(String s) {
		return (this.testedNumberSet.contains(s));
	}

	public boolean isInRecycledNumberSet(String s) {
		return (this.recycledNumberSet.contains(s));
	}

}
