Class TypeCast


  • public class TypeCast
    extends java.lang.Object
    Author:
    Kohsuke Kawaguchi
    • Constructor Summary

      Constructors 
      Constructor Description
      TypeCast()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <K,​V>
      java.util.Map<K,​V>
      checkedCast​(java.util.Map<?,​?> m, java.lang.Class<K> keyType, java.lang.Class<V> valueType)
      Makes sure that a map contains the right type, and returns it to the desirable type.
      • Methods inherited from class java.lang.Object

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

      • TypeCast

        public TypeCast()
    • Method Detail

      • checkedCast

        public static <K,​V> java.util.Map<K,​V> checkedCast​(java.util.Map<?,​?> m,
                                                                       java.lang.Class<K> keyType,
                                                                       java.lang.Class<V> valueType)
        Makes sure that a map contains the right type, and returns it to the desirable type.