public class PrefixPool extends Object
| Constructor and Description |
|---|
PrefixPool() |
| Modifier and Type | Method and Description |
|---|---|
void |
condense()
Eliminate unused space, on the assumption that no further prefixes will be added to the pool,
and that subsequent access will be to get the prefix for a code, and not vice versa.
|
String |
getPrefix(int code)
Get the prefix corresponding to a given code
|
int |
obtainPrefixCode(String prefix)
Get the prefix code corresponding to a given prefix, allocating a new code if necessary
|
public int obtainPrefixCode(String prefix)
prefix - public String getPrefix(int code)
code - the prefix code (which must have been allocated)IllegalArgumentException - if the code has not been allocatedpublic void condense()
Copyright (c) 2004-2017 Saxonica Limited. All rights reserved.