Here you can find the source of cast(Object o)
Parameter | Description |
---|---|
T | the implicit type to cast to. |
o | the instance to cast. |
public static <T> T cast(Object o)
//package com.java2s; // it under the terms of the GNU Lesser General Public License as published by public class Main { /**// w ww . j a v a 2s .c o m * Perform an unchecked cast. * * @param <T> * the implicit type to cast to. * @param o * the instance to cast. * @return the cast instance. */ public static <T> T cast(Object o) { return (T) o; } }