Runtime components : Core components : Typed data : Concepts : Object identity and keys
  
Object identity and keys
A benefit of type awareness is being able to exploit object identity. Data elements that are type aware can dynamically construct an identifier that distinguishes them from other data elements of the same type.
Note This is object identity in a business sense. For example, two instances of Customer 123 are distinct Java objects but in a business sense are the same customers because their identifiers are equal. The Key object is the mechanism that identifies an object in a business sense. The toolkit can check for equality between keyed objects, including checking whether the data elements are of the same type (because data elements of different types can never be equal).
The toolkit uses the getKey method to return the appropriate key object for the object's type. This key object can construct keys for data elements of the object's type or it can delegate this responsibility to a KeyBuilder. Simple types do not support keys and when you invoke getKey on them, they return a key with a null value.
See also
Concepts