@SuppressWarnings("unchecked") @Nullable private <R>R cast(@Nullable Object obj,Class<R> cls) throws IgniteCheckedException {
  if (obj == null)   return null;
  if (cls.isInstance(obj))   return (R)obj;
 else   throw new IgniteCheckedException("Failed to cast object [expected=" + cls + ", actual="+ obj.getClass()+ ']');
}

@ SuppressWarnings ( "unchecked" ) @ Nullable private < R > R cast ( @ Nullable Object obj , Class < R > cls ) throws IgniteCheckedException { if ( obj == null ) return null ; if ( cls . isInstance ( obj ) ) return ( R ) obj ; else throw new IgniteCheckedException ( "Failed to cast object [expected=" + cls + ", actual=" + obj . getClass ( ) + ']' ) ; }
tries to cast the object to expected type .
