eu.esdihumboldt.util
Class CustomIdentifiers<T>
java.lang.Object
eu.esdihumboldt.util.IdentifiersBase<T>
eu.esdihumboldt.util.Identifiers<T>
eu.esdihumboldt.util.CustomIdentifiers<T>
- Type Parameters:
T
- the type of objects that shall be identified
public class CustomIdentifiers<T>
- extends Identifiers<T>
Identifiers that allows custom identifiers to be used through
getId(Object, String)
.
- Author:
- Simon Templer
Method Summary |
String |
getId(T object,
String desiredId)
Get the identifier for the given object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CustomIdentifiers
public CustomIdentifiers(Class<T> clazz,
boolean useEquals)
- See Also:
Identifiers.Identifiers(Class, boolean)
CustomIdentifiers
public CustomIdentifiers(String prefix,
boolean useEquals,
int startCounter)
- See Also:
Identifiers.Identifiers(String, boolean, int)
CustomIdentifiers
public CustomIdentifiers(String prefix,
boolean useEquals)
- See Also:
Identifiers.Identifiers(String, boolean)
getId
public String getId(T object,
String desiredId)
- Get the identifier for the given object. If not already present, a new
identifier will be assigned, if possible the given desired identifier is
used.
- Parameters:
object
- the object to identifydesiredId
- the desired identifier
- Returns:
- the object identifier, if the identifier was newly assigned this
is either the desiredId or the desiredId with a suffix
Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d