question: @ SuppressWarnings ( "unchecked" ) public static < T extends DimensionalItemObject > List < T > asTypedList ( Collection < DimensionalItemObject > collection ) { List < T > list = new ArrayList < > ( ) ; if ( collection != null ) { for ( DimensionalItemObject object : collection ) { list . add ( ( T ) object ) ; } } return list ; }
target:  Returns a list typed with the desired erasure based on the given collection. This operation implies an unchecked cast and it is the responsibility of the caller to make sure the cast is valid. A copy of the given list will be returned.