org.apache.commons.functor.example.kata.two
Class BaseBinaryChop

java.lang.Object
  extended by org.apache.commons.functor.example.kata.two.BaseBinaryChop
All Implemented Interfaces:
BinaryChop

public abstract class BaseBinaryChop
extends Object
implements BinaryChop

See http://pragprog.com/pragdave/Practices/Kata/KataTwo.rdoc,v for more information on this Kata.

Version:
$Revision: 666191 $ $Date: 2008-06-10 18:43:53 +0200 (Tue, 10 Jun 2008) $
Author:
Rodney Waldhoff

Field Summary
protected static Integer NEGATIVE_ONE
           
 
Constructor Summary
BaseBinaryChop()
           
 
Method Summary
protected static int compare(List list, int index, Object obj)
           
protected static boolean equals(List list, int index, Object obj)
           
 int find(int seeking, int[] in)
           
abstract  int find(Object seeking, List in)
           
 int find(Object seeking, Object[] in)
           
protected static boolean greaterThan(List list, int index, Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEGATIVE_ONE

protected static final Integer NEGATIVE_ONE
Constructor Detail

BaseBinaryChop

public BaseBinaryChop()
Method Detail

find

public int find(int seeking,
                int[] in)
Specified by:
find in interface BinaryChop

find

public int find(Object seeking,
                Object[] in)
Specified by:
find in interface BinaryChop

compare

protected static int compare(List list,
                             int index,
                             Object obj)

greaterThan

protected static boolean greaterThan(List list,
                                     int index,
                                     Object obj)

equals

protected static boolean equals(List list,
                                int index,
                                Object obj)

find

public abstract int find(Object seeking,
                         List in)
Specified by:
find in interface BinaryChop


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.