Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.util
Class Identifiers<T>

java.lang.Object
  extended by eu.esdihumboldt.util.IdentifiersBase<T>
      extended by 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

Field Summary
 
Fields inherited from class eu.esdihumboldt.util.IdentifiersBase
ids, objects
 
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
 
Method Summary
 String getId(T object)
          Get the id of the given object.
 String getPrefix()
           
protected  void onInsertion(int num, String id, T object)
           
 
Methods inherited from class eu.esdihumboldt.util.IdentifiersBase
fetchId, getIds, getObject, getObjects, putObjectIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Identifiers

public Identifiers(Class<T> clazz,
                   boolean useEquals)
Creates Identifiers with type name prefix

Parameters:
clazz - the object type
useEquals - 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 prefix
useEquals - 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 prefix
useEquals - if the objects shall be compared using equals instead of the == operator
startCounter - number given to first identifier
Method Detail

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 id
id - the id corresponding num
object - the object just

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d