com.github.andrewoma.dexx.collection
Class IdentityKeyFunction<E>

java.lang.Object
  extended by com.github.andrewoma.dexx.collection.IdentityKeyFunction<E>
All Implemented Interfaces:
KeyFunction<E,E>

public class IdentityKeyFunction<E>
extends Object
implements KeyFunction<E,E>

IdentityKeyFunction is a KeyFunction where the value can be used as a key.

This is useful in DerivedKeyHashMap instances where the value defines equals() and hashCode() methods that only use the key.


Constructor Summary
IdentityKeyFunction()
           
 
Method Summary
 E key(E value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityKeyFunction

public IdentityKeyFunction()
Method Detail

key

@NotNull
public E key(@NotNull
                     E value)
Specified by:
key in interface KeyFunction<E,E>


Copyright © 2014. All Rights Reserved.