public class AtomGenerator extends Object
Call the method getAtom(name)
with a "name" that may be an empty
string. A "temporary" atom will then be created with a temporary name.
When all properties are added, call the method generateUniqueNames
to assign new unique names to the atoms that had a temporary name. No change
to the atom instance is required, and the atom index will not change.
Constructor and Description |
---|
AtomGenerator(PropCnr container)
Creates an atom generator using the atom manager and a property container.
|
Modifier and Type | Method and Description |
---|---|
void |
generateUniqueNames()
Called once all properties are set for a container.
|
Atom |
getAtom(String name)
Creates a new atom using the atom manager using the specified name.
|
Atom |
getAtom(String base,
String name)
Creates a new atom using the atom manager using the specified name if this name is not
empty, otherwise a temporary unique name is assigned.
|
public AtomGenerator(PropCnr container)
container
- The property container.public Atom getAtom(String name)
name
- The requested name.public Atom getAtom(String base, String name)
base
- The base name to use for the temporary name.name
- The requested name (or null or empty string when a generated name should be used).public void generateUniqueNames()
iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.