Documentation of 'org.jgrapht.util.TypeUtil' Java class
TypeUtil
org.jgrapht.util

Class TypeUtil<T>

  • Type Parameters:
    T - the type of the result


    public class TypeUtil<T>
    extends java.lang.Object
    TypeUtil isolates type-unsafety so that code which uses it for legitimate reasons can stay warning-free.
    • Constructor Summary

      Constructors 
      Constructor and Description
      TypeUtil() 
    • Method Summary

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

        equals, 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,
                                          TypeUtil<T> typeDecl)
        Casts an object to a type.
        Type Parameters:
        T - the type of the result
        Parameters:
        o - object to be cast
        typeDecl - conveys the target type information; the actual value is unused and can be null since this is all just stupid compiler tricks
        Returns:
        the result of the cast

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.