/*
 * Copyright (c) 2004, Rob Gordon.
 */
package org.treesched.regression;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.treesched.Interval;

/**
 *
 * @author Rob Gordon.
 */
public class Expected {

    private DateFormat format = new SimpleDateFormat("dd-MMM-yy HH:mm:ss:SSS");
    
    private Date from;
    private Date to;
	
    public void setFrom(String from) throws ParseException {
        this.from = format.parse(from);
    }
    
    public String getFrom() {
        return format.format(this.from);
    }
    
    public void setTo(String to) throws ParseException {
        this.to = format.parse(to);
    }
    
    public String getTo() {
        return format.format(this.to);    
    }
    
	public Interval getExpected() {
	    return new Interval(from, to);
	}

	public String toString() {
	    return getExpected().toString();
	}
}

