org.scijava
Interface Identifiable

All Known Implementing Classes:
AbstractModuleInfo, CommandInfo, DefaultMutableModuleInfo, DynamicCommandInfo, ScriptInfo

public interface Identifiable

An object which can express itself by some unique string.

Two objects that produce the same identifier string can be considered equivalent by some metric. The main use case for these identifiers is as a weak form of long-term serialization:

  1. An object's identifier is saved to long-term storage such as disk.
  2. Later, in a new JVM, the identifier is retrieved from disk.
  3. An existing index of objects is queried to find the object (if any) whose identifier matches the retrieved one.

In this way, objects themselves do not need to be Serializable, nor do multiple potentially equivalent objects need to be synthesized and then compared using #equals.

Author:
Curtis Rueden

Method Summary
 String getIdentifier()
          Gets a string intended to function as an identifier for the object.
 

Method Detail

getIdentifier

String getIdentifier()
Gets a string intended to function as an identifier for the object.



Copyright © 2009–2014 SciJava. All rights reserved.