com.bigdata.btree.keys
Class DelegateSortKeyBuilder<E,F>

java.lang.Object
  extended by com.bigdata.btree.keys.DelegateSortKeyBuilder<E,F>
Type Parameters:
E - The generic type of the object to which this builder will be applied.
F - The generic type of the object whose sort keys the delegate can generate.
All Implemented Interfaces:
ISortKeyBuilder<E>

public abstract class DelegateSortKeyBuilder<E,F>
extends Object
implements ISortKeyBuilder<E>

Delegation pattern for ISortKeyBuilder that is useful when you need to resolve(Object) one type to another before applying the delegate to generate the sort key.

Version:
$Id: DelegateSortKeyBuilder.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Constructor Summary
DelegateSortKeyBuilder(ISortKeyBuilder<F> delegate)
           
 
Method Summary
 byte[] getSortKey(E e)
          Return an unsigned byte[] sort key.
protected abstract  F resolve(E e)
          Resolve one generic type to another.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegateSortKeyBuilder

public DelegateSortKeyBuilder(ISortKeyBuilder<F> delegate)
Method Detail

resolve

protected abstract F resolve(E e)
Resolve one generic type to another.

Parameters:
e - An element.
Returns:
The resolved element.

getSortKey

public byte[] getSortKey(E e)
Description copied from interface: ISortKeyBuilder
Return an unsigned byte[] sort key.

Specified by:
getSortKey in interface ISortKeyBuilder<E>
Parameters:
e - Some object (required).
Returns:
The unsigned byte[] sort key.


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.