public class ObjectId
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
ObjectId.InstancesOfType |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,ObjectId.InstancesOfType> |
allInstances |
private java.util.Map<java.lang.Integer,java.lang.String> |
allInstancesHash2Id |
private java.util.List<java.lang.Object> |
allInstancesInOrder |
private java.util.Map<java.lang.Integer,java.lang.Object> |
allInstancesPerHash |
private java.util.Map<java.lang.String,java.lang.Object> |
allInstancesPerId |
private int |
nextTypeId |
static java.lang.String |
sVersion
Version, history and license.
|
Constructor and Description |
---|
ObjectId() |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.Object> |
allInstances()
Returns a list which contains all instances in order of registration with
#instanceId(Object) . |
java.lang.String |
getIdFromHash(int hash)
Returns the identification by a given hash for all instances which are already registered with
#instanceId(Object) . |
java.lang.Object |
getPerHash(int hash)
Returns the object by a given hash for all instances which are already registered with
#instanceId(Object) . |
java.lang.Object |
getPerId(java.lang.String id)
Returns the Object by a given identification for all instances which are already registered with
#instanceId(Object) . |
java.lang.String |
instanceId(java.lang.Object data,
java.util.Queue<java.lang.Object> newInstances)
Returns a unique identification String for this instance.
|
java.lang.String |
toStringNoHash(java.lang.Object data)
This method executes the toString() method for data.
|
public static final java.lang.String sVersion
DataShow
.
private int nextTypeId
private java.util.Map<java.lang.String,ObjectId.InstancesOfType> allInstances
private java.util.Map<java.lang.Integer,java.lang.String> allInstancesHash2Id
private final java.util.Map<java.lang.String,java.lang.Object> allInstancesPerId
private final java.util.Map<java.lang.Integer,java.lang.Object> allInstancesPerHash
private final java.util.List<java.lang.Object> allInstancesInOrder
public java.lang.String instanceId(java.lang.Object data, java.util.Queue<java.lang.Object> newInstances)
data
- The instancepublic java.lang.Object getPerId(java.lang.String id)
#instanceId(Object)
.
It returns null if the identification is unknown here.id
- given identification#instanceId(Object)
was called for this object before, elsewhere null.public java.lang.Object getPerHash(int hash)
#instanceId(Object)
.
It returns null if the hash is unknown here.hash
- given hashCode from an Object#instanceId(Object)
was called for this object before, elsewhere null.public java.lang.String getIdFromHash(int hash)
#instanceId(Object)
.
It returns null if the hash is unknown here.hash
- given hashCode from an Object#instanceId(Object)
was called for this object before, elsewhere null.public java.util.List<java.lang.Object> allInstances()
#instanceId(Object)
.
The list should not be modified for further usage.public java.lang.String toStringNoHash(java.lang.Object data)
#instanceId(Object)
then the hash code is replaced by the instanceId. Elsewhere the toString() output is not replaced.data
-