class ReferenceEqualityKey<K> {

    /** The wrapped key. */
    private final K wrappedKey;

    /**
     * Constructor.
     *
     * @param wrappedKey
     *            the wrapped key
     */
    public ReferenceEqualityKey(final K wrappedKey) {
        this.wrappedKey = wrappedKey;
    }

    /**
     * Get the wrapped key.
     *
     * @return the wrapped key.
     */
    public K get() {
        return wrappedKey;
    }

    /**
     * Hash code.
     *
     * @return the int
     */
    /* (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {<FILL_FUNCTION_BODY>}

    /**
     * Equals.
     *
     * @param obj
     *            the obj
     * @return true, if successful
     */
    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(final Object obj) {
        if (obj == this) {
            return true;
        } else if (!(obj instanceof ReferenceEqualityKey)) {
            return false;
        }
        return wrappedKey == ((ReferenceEqualityKey<?>) obj).wrappedKey;
    }

    /**
     * To string.
     *
     * @return the string
     */
    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        final K key = wrappedKey;
        return key == null ? "null" : key.toString();
    }
}

        final K key = wrappedKey;
        // Don't call key.hashCode(), because that can be an expensive (deep) hashing method,
        // e.g. for ByteBuffer, it is based on the entire contents of the buffer
        return key == null ? 0 : System.identityHashCode(key);
    
<no_super_class>