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

// -*-Mode: Java-*- 
// $Id: CommandReasoner.java,v 1.3 2003/03/06 00:40:48 moltmans Exp $
// CommandReasoner.java -- 
// Author: Michael Oltmans <moltmans@ai.mit.edu> 
// Created: <Fri Feb 25 20:04:00 2000> 
// Time-stamp: <2000-03-05 15:44:58 moltmans> 
package rec.core.reasoners;

import java.util.*;
import rec.sys.*;
import rec.util.*;

public class CommandReasoner extends Reasoner 
{
  private static Vector m_Strong = new Vector();
  private static Vector m_Weak = new Vector();

  static 
  {
    m_Strong.addElement( "rec.core.widgets.WCommand" );
    m_Weak.addElement( "rec.sys.WUtterance" );
    m_Weak.addElement( "rec.sys.VisibleWidget" );
  }

  public Iterator getStrongerTypes()
  {
    return m_Strong.iterator();
  }

  public Iterator getWeakerTypes()
  {
    return m_Weak.iterator();
  }

  public boolean match( Surface s, Widget stronger, Widget weaker )
  {
    Console.writeln( "Command Reasoner match:" );
    Console.writeln( "Command Reasoner    st:" + stronger );
    Console.writeln( "Command Reasoner    we:" + weaker );

    if ( weaker.isItA( "rec.core.widgets.WCommand" ) )
      return false;
    else
      return true;
  }

}

