fullRuntime/src/sc/type/Type.java
public Object evalCast(Class theClass, Object val) {
      if (theClass.isInstance(val) || theClass == primitiveClass) {
         return val;
      }
      throw new ClassCastException("Value " + val + " of type: " + (val == null ? "null" : val.getClass()) + " cannot be cast to: " + theClass);
   }
/** Takes the class used to get this type as the first argument and implements the cast operator on the value */
Takes the class used to get this type as the first argument and implements the cast operator on the value
Takes the class used to get this type as the first argument and implements the cast operator on the value
public Object evalCast(Class theClass, Object val) {
      if (theClass.isInstance(val) || theClass == primitiveClass) {
         return val;
      }
      throw new ClassCastException("Value " + val + " of type: " + (val == null ? "null" : val.getClass()) + " cannot be cast to: " + theClass);
   }
public Object evalCast ( Class theClass , Object val ) { if ( theClass . isInstance ( val ) || theClass == primitiveClass ) { return val ; } throw new ClassCastException ( "Value " + val + " of type: " + ( val == null ? "null" : val . getClass ( ) ) + " cannot be cast to: " + theClass ) ; }
Takes the class used to get this type as the first argument and implements the cast operator on the value
Takes the class used to get this type as the first argument and implements the cast operator on the value