com.github.andrewoma.dexx.collection
Class IdentityKeyFunction<E>
java.lang.Object
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.
|
Method Summary |
E |
key(E value)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IdentityKeyFunction
public IdentityKeyFunction()
key
@NotNull
public E key(@NotNull
E value)
- Specified by:
key in interface KeyFunction<E,E>
Copyright © 2014. All Rights Reserved.