|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.util.IdentifiersBase<T>
T
- the type of objects that shall be identifiedpublic abstract class IdentifiersBase<T>
A base class for identifier handling
Field Summary | |
---|---|
protected Map<T,String> |
ids
maps objects to identifiers |
protected Map<String,T> |
objects
maps identifiers to objects |
Constructor Summary | |
---|---|
protected |
IdentifiersBase(boolean useEquals)
|
Method Summary | |
---|---|
String |
fetchId(T object)
Get the id of the given object if it has an Id. |
String |
getId(T object)
Get the id of the given object. |
Set<String> |
getIds()
Get the ids of all objects |
T |
getObject(String id)
Get the object with the given id |
Set<T> |
getObjects()
Get the set of objects |
protected void |
putObjectIdentifier(T object,
String id)
puts a object-identifier pair into the maps, no checks or what. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Map<String,T> objects
protected final Map<T,String> ids
Constructor Detail |
---|
protected IdentifiersBase(boolean useEquals)
useEquals
- whether to use equality or object identity as identifier
scopeMethod Detail |
---|
protected void putObjectIdentifier(T object, String id)
object
- the objectid
- the identifierpublic String getId(T object)
object
- the object
public String fetchId(T object)
object
- the object
public final T getObject(String id)
id
- the id
public final Set<T> getObjects()
public final Set<String> getIds()
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |