public class IdGenerator
extends java.lang.Object
Constructor and Description |
---|
IdGenerator() |
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
getAnchorNames()
|
IdGenerationStrategy |
getGenerationStrategy() |
boolean |
hasAnchorNames()
Indicates whether there are any
anchor names . |
java.lang.String |
newId(java.lang.String type,
java.lang.String text)
create a new ID based on the given type and label text.
|
boolean |
reserveId(java.lang.String id)
reserve the given id, ensuring that the generator will not generate the same id.
|
void |
setGenerationStrategy(IdGenerationStrategy generationStrategy) |
public boolean reserveId(java.lang.String id)
generated
.id
- the id to reservepublic java.lang.String newId(java.lang.String type, java.lang.String text)
type
- the type of id to produce, usually an indication of what the id is created for. For example, 'h1', or
'h2'. may be null.text
- the label text for which the id is being produced. may be null.public java.util.Set<java.lang.String> getAnchorNames()
public boolean hasAnchorNames()
anchor names
.public IdGenerationStrategy getGenerationStrategy()
public void setGenerationStrategy(IdGenerationStrategy generationStrategy)
Copyright © 2007, 2013 David Green and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html