public class UriTable<T> extends InternalNodeIdUtilAccessor
NamespaceTable and ServerTable.
Historically this class contained only String-based URIs, but now it is generified to allow
NamespaceTable hold UaNamespace and ServerTable to hold
UaApplicationURI instances.
| Constructor and Description |
|---|
UriTable(Function<String,T> uriToObjectTransformer)
Creates new
UriTable. |
| Modifier and Type | Method and Description |
|---|---|
int |
add(int index,
String uri)
Add a new uri to the table.
|
int |
add(String uri)
Add a new uri to the table.
|
void |
addAll(String[] namespaceArray)
addAll.
|
protected boolean |
containsObject(T object)
Returns true if this
UriTable has a mapping for the given object, false if not. |
int |
getIndex(String namespaceUri)
Finds the index of the namespace URI in the table.
|
protected T |
getObjectByIndex(int index)
Returns domain object if one exist for the index, null if not.
|
protected T |
getObjectByUri(String uri)
Returns domain object if one exist for the uri, null if not.
|
String |
getUri(int index)
Finds the URI with index in the table.
|
void |
remove(int index)
Remove the entry for the specified index.
|
void |
remove(String uri)
Remove the entry for the specified uri.
|
int |
size()
size.
|
String[] |
toArray()
toArray.
|
String |
toString() |
getNodeIdWithPreCalcHashCodepublic UriTable(Function<String,T> uriToObjectTransformer)
UriTable. The given function is used to transform the String URI to the
"domain object" (UaNamespace or UaApplicationURI).public int add(int index,
String uri)
index - The new index (use -1 to automatically use the next unused index)uri - The URI.IllegalArgumentException - if the index is already in usepublic int add(String uri)
uri - The URI.public void addAll(String[] namespaceArray)
addAll.
namespaceArray - an array of String objects.public int getIndex(String namespaceUri)
namespaceUri - the URI of the namespace you are looking forpublic String getUri(int index)
index - the index you are looking forpublic void remove(int index)
index - a int.public void remove(String uri)
uri - a String object.public int size()
size.
protected boolean containsObject(T object)
UriTable has a mapping for the given object, false if not.protected T getObjectByIndex(int index)
Copyright © 2026. All rights reserved.