The NodeURL class is one of the subclass of PortalURL that is specialized in navigation node resources:
public class NodeURL extends PortalURL<NavigationResource, NodeURL>
{
...
}
The NodeURL class does not carry any generic types of its super class, which means that a NodeURL is type-safe and you do not have to worry about generic types.
Using a NodeURL is pretty straightforward:
NodeURL url = RequestContext.getCurrentInstance().createURL(NodeURL.TYPE);
url.setResource(new NavigationResource("portal", "classic, "home"));
String s = url.toString();
The NodeURL subclass contains the specialized setter methods to make its usage even easier:
UserNode node = ...;
NodeURL url = RequestContext.getCurrentInstance().createURL(NodeURL.TYPE);
url.setNode(node);
String s = url.toString();