Class CastUtil

java.lang.Object
info.u_team.u_team_core.util.CastUtil

public class CastUtil extends Object
Utility methods for casts
  • Constructor Details

    • CastUtil

      public CastUtil()
  • Method Details

    • uncheckedCast

      public static <T> T uncheckedCast(Object object) throws ClassCastException
      Convenient helper method for unchecked class without suppressing warnings. CAREFULL, CAST IS STILL UNCHECKED!
      Type Parameters:
      T - The type that the object should be
      Parameters:
      object - The object
      Returns:
      Casted object to the desired type
      Throws:
      ClassCastException - when unchecked cast fails