com.mhhe.clrs2e
Class CountingSort.CountingSortKeyExtractor

java.lang.Object
  |
  +--com.mhhe.clrs2e.CountingSort.CountingSortKeyExtractor
All Implemented Interfaces:
CountingSort.KeyExtractor
Enclosing class:
CountingSort

private static class CountingSort.CountingSortKeyExtractor
extends java.lang.Object
implements CountingSort.KeyExtractor

Inner class implementing KeyExtractor, in which each extract method just returns its argument.


Constructor Summary
private CountingSort.CountingSortKeyExtractor()
           
 
Method Summary
 int extract(int value)
          Extracts the key from an int; an identity function.
 int extract(com.mhhe.clrs2e.NonNegativeInteger value)
          Extracts the key from a NonNegativeInteger; an identity function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountingSort.CountingSortKeyExtractor

private CountingSort.CountingSortKeyExtractor()
Method Detail

extract

public int extract(int value)
Extracts the key from an int; an identity function.

Specified by:
extract in interface CountingSort.KeyExtractor
Parameters:
value - The int whose key is to be extracted.
Returns:
value.

extract

public int extract(com.mhhe.clrs2e.NonNegativeInteger value)
Extracts the key from a NonNegativeInteger; an identity function.

Specified by:
extract in interface CountingSort.KeyExtractor
Parameters:
value - The NonNegativeInteger whose key is to be extracted.
Returns:
value.