public class PrefixPool
extends java.lang.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.
|
java.lang.String |
getPrefix(int code)
Get the prefix corresponding to a given code
|
int |
obtainPrefixCode(java.lang.String prefix)
Get the prefix code corresponding to a given prefix, allocating a new code if necessary
|
public int obtainPrefixCode(java.lang.String prefix)
prefix
- public java.lang.String getPrefix(int code)
code
- the prefix code (which must have been allocated)java.lang.IllegalArgumentException
- if the code has not been allocatedpublic void condense()
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.