package tcra.exercises.resolve_stack_mystery_private;

import java.util.List;
import tcra.math.Assertion;
import tcra.math.MathString;
import tcra.math.MathType;

public class ResolveStackMystery_PostMystery1_2Assertion implements
      Assertion
{
   public ResolveStackMystery_PostMystery1_2Assertion() {}

   @SuppressWarnings("unchecked")
   public boolean check(List<MathType> t)
   {
      MathString<MathType> lb_self = (MathString<MathType>)t.get(0);
      MathString<MathType> self    = (MathString<MathType>)t.get(1);
      
      return(self.equals(lb_self));
   } // end check(List)
   
   public String toString()
   {
      return("S = #S");
   } // end toString()

   @SuppressWarnings("unchecked")
   public String toInstanceString(List<MathType> t)
   {
      MathString<MathType> lb_self = (MathString<MathType>)t.get(0);
      MathString<MathType> self    = (MathString<MathType>)t.get(1);
      
      return(self.toHTMLString()+" = "+lb_self.toHTMLString());
   } // end toInstanceString(List)
} // end class
