JavaAlgorithms
Elementary and no so elementary Java algorithms
sort.MergeSortFile< T extends Comparable< T > &Serializable >.ReadFileValues Class Reference
Collaboration diagram for sort.MergeSortFile< T extends Comparable< T > &Serializable >.ReadFileValues:

List of all members.

Public Member Functions

 ReadFileValues (ArrayList< FileObjContainer > objFiles) throws ClassNotFoundException, IOException
getLeastVal () throws ClassNotFoundException, IOException

Protected Member Functions

int minIx (ArrayList< T > values)

Detailed Description

A class to manage reading the values from the sorted files, in increasing order. That is, read values from the files and always return the least value. This object hides of complexity involved with making sure that values are read from the files in increasing order.

ReadFileValues Jun 25, 2013

Author:
Ian Kaplan, iank@bearcave.com

Definition at line 102 of file MergeSortFile.java.


Constructor & Destructor Documentation

sort.MergeSortFile< T extends Comparable< T > &Serializable >.ReadFileValues.ReadFileValues ( ArrayList< FileObjContainer >  objFiles) throws ClassNotFoundException, IOException

Definition at line 106 of file MergeSortFile.java.


Member Function Documentation

T sort.MergeSortFile< T extends Comparable< T > &Serializable >.ReadFileValues.getLeastVal ( ) throws ClassNotFoundException, IOException

Definition at line 144 of file MergeSortFile.java.

int sort.MergeSortFile< T extends Comparable< T > &Serializable >.ReadFileValues.minIx ( ArrayList< T >  values) [protected]

Find the minimum value in the input ArrayList argument values. Some of the elements in this array may be null (this occurs when the end of one of the files that feeds values into this array is reached).

Parameters:
values
Returns:
the index of the minimum value or -1 if there is no minimum value (e.g., all array elements are null).

Definition at line 126 of file MergeSortFile.java.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables