package tcra.exercises.resolve_preemptable_queue_private;

import java.util.List;
import tcra.math.*;
import tcra.exercises.ResolvePreemptableQueueExercise;

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

   @SuppressWarnings("unchecked")
   public boolean check(List<MathType> t)
   {
      MathString<MathType> lb_self = (MathString<MathType>)t.get(0);

      return(lb_self.length() <
             ResolvePreemptableQueueExercise.getMaxLength());
   } // end check(List)
   
   public String toString()
   {
      return("|Q| &lt; Max_Length;");
   } // end toString()

   @SuppressWarnings("unchecked")
   public String toInstanceString(List<MathType> t)
   {
      MathString<MathType> lb_self = (MathString<MathType>)t.get(0);
      return("|"+lb_self.length()+"| &gt; "+
             ResolvePreemptableQueueExercise.getMaxLength()+";");
   } // end toIntsanceString()
} // end class
