package tcra.exercises.resolve_one_way_list_private;

import java.util.*;
import tcra.math.*;

public class ResolveOneWayList_PostRemCapacityAssertion implements
      Assertion
{
   public ResolveOneWayList_PostRemCapacityAssertion() {}
   
   @SuppressWarnings("unchecked")
   public boolean check(List<MathType> t)
   {
      MathString<MathType> lb_self  = (MathString<MathType>)t.get(0);
      MathInteger          rem_cap  = (MathInteger)t.get(2);
      
      return(rem_cap.equals(10-lb_self.length()));
   } // end check(List<MathType>)

   @SuppressWarnings("unchecked")
   public String toInstanceString(List<MathType> t)
   {
      MathString<MathType> lb_self = (MathString<MathType>)t.get(0);
      MathInteger          rem_cap  = (MathInteger)t.get(2);
      
      return ""+rem_cap.toHTMLString()+" = ( "+(10-lb_self.length())+" );";
   } // end toInstanceString(List<MathType>)

   public String toString()
   {
      return "Rmng_Capacity = ( Remaining_Cap );";
   } // end toString()
} // end class
