public class NamespaceTable extends Object
| Constructor and Description |
|---|
NamespaceTable() |
| Modifier and Type | Method and Description |
|---|---|
UShort |
addUri(String uri)
Add a URI to the NamespaceTable and return the index.
|
@Nullable UShort |
getIndex(String uri) |
String |
getUri(int index) |
String |
getUri(UShort index) |
void |
putUri(String uri,
UShort index) |
String[] |
toArray() |
void |
update(Consumer<com.google.common.collect.BiMap<UShort,String>> uriTableConsumer) |
public UShort addUri(String uri)
If the URI is not present in the table the next available index is assigned.
If the table already contains the URI the current index is returned.
uri - the namespace URI to add.public String getUri(int index)
@Nullable public @Nullable UShort getIndex(String uri)
uri - the namespace URI to look up.null if it is not present.public void update(Consumer<com.google.common.collect.BiMap<UShort,String>> uriTableConsumer)
public String[] toArray()
Copyright © 2025. All rights reserved.