// (c) MIT 2003.  All rights reserved.

// -*-Mode: Java-*- 
// $Id: LeadsTo.java,v 1.2 2003/03/06 00:40:43 moltmans Exp $
// LeadsTo.java -- 
// Author: Michael Oltmans <moltmans@ai.mit.edu> 
// Created: <Mon May 08 15:11:34 2000> 
// Time-stamp: <2000-05-08 17:46:22 moltmans> 
package rec.annotate.rules;

import rec.tms.*;
import rec.annotate.*;

/**
 **/
public class LeadsTo implements Annotation
{
  protected Event m_event1;
  protected Event m_event2;

  public LeadsTo( Event event1, Event event2 )
  {
    m_event1 = event1;
    m_event2 = event2;
  }

  public String getFactType() 
  {
    return Type.LEADS_TO;
  }
  
  public boolean sameFact( Fact fact ) 
  {
    if( fact instanceof LeadsTo ) {
      LeadsTo f = (LeadsTo)fact;
      return ( m_event1.sameFact( f.m_event1 ) &&
	       m_event2.sameFact( f.m_event2 ) );
    }
    return false;
  }


  public String toString() 
  {
    return "<leads-to: [" + m_event1 + "] [" + m_event2 + "]>";
  }
}
