Back to project page sony-camera-remote-java.
The source code is released under:
Apache License
If you think the Android project sony-camera-remote-java listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.praetoriandroid.cameraremote.rpc; //from ww w . ja v a 2s .c o m import java.util.HashMap; import java.util.Map; public class GetEventResponse extends BaseResponse<EventEntity> { private transient Map<Class<? extends EventEntity>, EventEntity> entities = new HashMap<Class<? extends EventEntity>, EventEntity>(); void postProcess() { for (EventEntity entity : getResult()) { if (entity != null) { entities.put(entity.getType().getEntityClass(), entity); } } } public <T extends EventEntity> T getEntity(Class<T> eventType) { //noinspection unchecked return (T) entities.get(eventType); } }