T - concrete entity typepublic abstract class ProjectEntityWithIDContainer<T extends ProjectEntityWithID & Comparable<T>> extends ProjectEntityContainer<T>
| Modifier and Type | Field and Description |
|---|---|
protected Map<Integer,T> |
m_idMap |
m_sequenceProvidermodCount| Constructor and Description |
|---|
ProjectEntityWithIDContainer(ProjectFile projectFile)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
T |
getByID(Integer id)
Retrieve an entity by its ID.
|
Integer |
getNextID()
Retrieve the next ID value for this entity.
|
void |
mapID(Integer id,
T entity)
Add an ID to instance mapping.
|
void |
renumberIDs()
This method can be called to ensure that the IDs of all
entities are sequential, and start from an
appropriate point.
|
void |
unmapID(Integer id)
Remove the ID to instance mapping.
|
added, firstUniqueID, fixUniqueIdClashes, getByUniqueID, removed, updateUniqueIDadd, add, clear, get, remove, replaced, set, sizeaddAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayparallelStream, removeIf, streamprotected final Map<Integer,T extends ProjectEntityWithID & Comparable<T>> m_idMap
public ProjectEntityWithIDContainer(ProjectFile projectFile)
projectFile - parent projectpublic void renumberIDs()
public T getByID(Integer id)
id - entity IDpublic void unmapID(Integer id)
id - ID to removepublic void mapID(Integer id, T entity)
id - IDentity - instancepublic Integer getNextID()
Copyright © 2000–2025 MPXJ. All rights reserved.