Class UriArray<I extends UNumber>
java.lang.Object
org.eclipse.milo.opcua.stack.core.UriArray<I>
- Direct Known Subclasses:
NamespaceTable,ServerTable
Manages an array of URIs and provides bidirectional access to the URIs their indices.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a URI and return the index.protected abstract ICreate a new index of typeUriArrayfromindex.Get the URI atindex, ornullif there isn't one.Get the URI atindex, ornullif there isn't one.@Nullable IReplace the URI atindexwithuri.Replace the URI atindexwithuri.String[]toArray()voidUpdate the underlyingBiMap.
-
Constructor Details
-
UriArray
public UriArray()
-
-
Method Details
-
add
Add a URI and return the index.If the URI is not already present the next available index is assigned, otherwise the current index is returned.
- Parameters:
uri- the namespace URI to add.- Returns:
- the index assigned to the URI.
-
get
Get the URI atindex, ornullif there isn't one.- Parameters:
index- the index of the URI to get.- Returns:
- the URI at
index, ornullif there isn't one.
-
get
Get the URI atindex, ornullif there isn't one.- Parameters:
index- the index of the URI to get.- Returns:
- the URI at
index, ornullif there isn't one.
-
getIndex
- Parameters:
uri- the URI to look up.- Returns:
- the index of the URI, or
nullif it is not present.
-
set
Replace the URI atindexwithuri.- Parameters:
index- the index to replace.uri- the URI to replace with.- Returns:
- the previous URI at
index, ornullif there was none.
-
set
Replace the URI atindexwithuri.- Parameters:
index- the index to replace.uri- the URI to replace with.- Returns:
- the previous URI at
index, ornullif there was none.
-
update
Update the underlyingBiMap.- Parameters:
uriTableConsumer- the underlyingBiMapinstance.
-
toArray
- Returns:
- an array of registered URIs, ordered by index ascending.
-
create
Create a new index of typeUriArrayfromindex.- Parameters:
index- the index to create.- Returns:
- the new index.
-