Class TypeUtil


  • public class TypeUtil
    extends java.lang.Object
    TypeUtil isolates type-unsafety so that code which uses it for legitimate reasons can stay warning-free.
    Author:
    John V. Sichi
    • Constructor Summary

      Constructors 
      Constructor Description
      TypeUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T uncheckedCast​(java.lang.Object o)
      Casts an object to a type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TypeUtil

        public TypeUtil()
    • Method Detail

      • uncheckedCast

        public static <T> T uncheckedCast​(java.lang.Object o)
        Casts an object to a type.
        Type Parameters:
        T - the type of the result
        Parameters:
        o - object to be cast
        Returns:
        the result of the cast