package tcra.exercises.general_assertions;

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

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

   @SuppressWarnings("unchecked")
   public boolean check(List<MathType> l)
   {
      MathString<MathType> lb_self =
         (MathString<MathType>)l.get(0);
      return(lb_self.length() > 0);
   } // end check(List)

   public String toString()
   {
      return "(|self| &gt; 0)";
   } // end toString()

   public String toInstanceString(List<MathType> l)
   {
      return "(|" + l.get(0).toHTMLString() + "| &gt; 0)";
   } // end toString(List)
} // end class
