Top Description Fields Constructors Methods
org.apache.commons.lang3.builder

pack-priv final Class IDKey

extends Object
Class Inheritance

Wrap an identity key (System.identityHashCode()) so that an object can only be equal() to itself. This is necessary to disambiguate the occasional duplicate identityHashCodes that can occur.

Field Summary

Modifier and TypeField and Description
private final int
private final Object

Constructor Summary

AccessConstructor and Description
pack-priv
IDKey(final Object
The value
value
)

Constructs new instance.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

if the instances are for the same object
equals
(final Object
The other object to compare to
other
)

Overrides java.lang.Object.equals.

Tests if instances are equal.

public int

Returns:

the hash code.
hashCode
()

Overrides java.lang.Object.hashCode.

Gets the hash code, the system identity hash code.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

idback to summary
private final int id
valueback to summary
private final Object value

Constructor Detail

IDKeyback to summary
pack-priv IDKey(final Object value)

Constructs new instance.

Parameters
value:Object

The value

Method Detail

equalsback to summary
public boolean equals(final Object other)

Overrides java.lang.Object.equals.

Tests if instances are equal.

Parameters
other:Object

The other object to compare to

Returns:boolean

if the instances are for the same object

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Gets the hash code, the system identity hash code.

Returns:int

the hash code.

Annotations
@Override