org.jgrapht.util

## Class TypeUtil<T>

- java.lang.Object
- - org.jgrapht.util.TypeUtil<T>

-     public class TypeUtil<T>
      extends 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 and Description
    `TypeUtil()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> T` | `uncheckedCast(Object o, TypeUtil<T> typeDecl)` 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(Object o,
                            TypeUtil<T> typeDecl)

      Casts an object to a type.
      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

Copyright © 2016. All rights reserved.