eu.esdihumboldt.util
Class Identifiers<T>
java.lang.Object
eu.esdihumboldt.util.IdentifiersBase<T>
eu.esdihumboldt.util.Identifiers<T>
- Type Parameters:
T
- the type of objects that shall be identified
- Direct Known Subclasses:
- CustomIdentifiers
public class Identifiers<T>
- extends IdentifiersBase<T>
Stores identifiers for certain objects
- Author:
- Simon Templer
Constructor Summary |
Identifiers(Class<T> clazz,
boolean useEquals)
Creates Identifiers with type name prefix |
Identifiers(String prefix,
boolean useEquals)
Creates Identifiers with the given prefix |
Identifiers(String prefix,
boolean useEquals,
int startCounter)
Creates Identifiers with the given prefix |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Identifiers
public Identifiers(Class<T> clazz,
boolean useEquals)
- Creates Identifiers with type name prefix
- Parameters:
clazz
- the object typeuseEquals
- if the objects shall be compared using equals instead of
the == operator
Identifiers
public Identifiers(String prefix,
boolean useEquals)
- Creates Identifiers with the given prefix
- Parameters:
prefix
- the identifier prefixuseEquals
- if the objects shall be compared using equals instead of
the == operator
Identifiers
public Identifiers(String prefix,
boolean useEquals,
int startCounter)
- Creates Identifiers with the given prefix
- Parameters:
prefix
- the identifier prefixuseEquals
- if the objects shall be compared using equals instead of
the == operatorstartCounter
- number given to first identifier
getPrefix
public String getPrefix()
- Returns:
- the prefix
getId
public final String getId(T object)
- Get the id of the given object.
- Overrides:
getId
in class IdentifiersBase<T>
- Parameters:
object
- the object
- Returns:
- the id of the object
onInsertion
protected void onInsertion(int num,
String id,
T object)
- Parameters:
num
- the number used to generate the idid
- the id corresponding numobject
- the object just
Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d