NodeId { public ExpandedNodeId expanded() { return new ExpandedNodeId(namespaceIndex, null, identifier, UInteger.MIN); } NodeId(int namespaceIndex, int identifier);  NodeId(int namespaceIndex, UInteger identifier);  NodeId(int namespaceIndex, String identifier);  NodeId(int namespaceIndex, UUID identifier);  NodeId(int namespaceIndex, ByteString identifier);  NodeId(UShort namespaceIndex, UInteger identifier);  NodeId(UShort namespaceIndex, int identifier);  NodeId(UShort namespaceIndex, String identifier);  NodeId(UShort namespaceIndex, UUID identifier);  NodeId(UShort namespaceIndex, ByteString identifier);   NodeId(@Nonnull UShort namespaceIndex, @Nonnull Object identifier); UShort getNamespaceIndex(); Object getIdentifier(); IdType getType(); ExpandedNodeId expanded(); ExpandedNodeId expanded(NamespaceTable namespaceTable); boolean isNull(); boolean isNotNull(); NodeId reindex(NamespaceTable namespaceTable, String namespaceUri); NodeId withId(UInteger id); NodeId withId(String id); NodeId withId(UUID id); NodeId withId(ByteString id); NodeId withNamespaceIndex(UShort namespaceIndex); @Override boolean equals(Object o); boolean equals(ExpandedNodeId xni); boolean equals(ExpandedNodeId xni, NamespaceTable namespaceTable); @Override int hashCode(); @Override String toString(); String toParseableString(); static NodeId parse(@Nonnull String s); @Nullable static NodeId parseOrNull(@Nonnull String s); static Optional<NodeId> parseSafe(@Nonnull String s); static final NodeId NULL_NUMERIC; static final NodeId NULL_STRING; static final NodeId NULL_GUID; static final NodeId NULL_OPAQUE; static final NodeId NULL_VALUE; }
@Test public void testExpandedWithNamespaceTable() { NamespaceTable namespaceTable = new NamespaceTable(); namespaceTable.addUri("urn:test"); NodeId nodeId = new NodeId(1, "foo"); ExpandedNodeId xni = nodeId.expanded(namespaceTable); assertEquals(xni.getNamespaceUri(), "urn:test"); }