return new NodeContextPath(childSegments);\r
}\r
\r
- @SuppressWarnings("rawtypes")\r
+ @SuppressWarnings("unchecked")\r
@Override\r
- public Object getAdapter(Class adapter) {\r
+ public <T> T getAdapter(Class<T> adapter) {\r
if (NodeContext.class == adapter)\r
- return getLastSegment();\r
+ return (T) getLastSegment();\r
NodeContext last = getLastSegment();\r
if (last instanceof IAdaptable)\r
return ((IAdaptable) last).getAdapter(adapter);\r