org.apache.commons.pipeline.util
Interface KeyFactory<T,K>

All Known Implementing Classes:
KeyFactory.HashKeyFactory

public interface KeyFactory<T,K>

An implementation of this interface should define a strategy that will allow a unique identifier to be generated for an object. This identifier may be mutually comparable with identifiers generated for a different object type; it is used to permit signalling between drivers in separate pipeline branches.


Nested Class Summary
static class KeyFactory.HashKeyFactory
          Trivial key factory that produces the object's hash code as a key.
 
Method Summary
 K generateKey(T source)
          Generates a unique identifier of type K for an object of type T.
 

Method Detail

generateKey

K generateKey(T source)
Generates a unique identifier of type K for an object of type T.

Returns:
the newly created identifier


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.