Here you can find the source of getObjects(List
Parameter | Description |
---|---|
T | Type. |
objEls | List of JAXBElements. |
public static <T> List<T> getObjects(List<JAXBElement<T>> objEls)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; import javax.xml.bind.JAXBElement; public class Main { /**/*from w ww. j ava2s .co m*/ * Get the list of {@code T} from list of {@code JAXBElement<T>}. * @param <T> Type. * @param objEls List of JAXBElements. * @return List of {@code T}. */ public static <T> List<T> getObjects(List<JAXBElement<T>> objEls) { List<T> list = new ArrayList<T>(); for (JAXBElement<? extends T> objEl : objEls) { list.add(objEl.getValue()); } return list; } }