peakml
Interface PeakData.PeakFactory<gPeak extends Peak>

All Known Implementing Classes:
Centroid.Factory
Enclosing class:
PeakData<gPeak extends Peak>

public static interface PeakData.PeakFactory<gPeak extends Peak>

Interface describing a factory for the creation of instances of the generic gPeak type. This has been separated to make it easier to integrate new types of Peak subclasses into the PeakData structure. Also, it provides a means of keeping track of the type associated to the PeakData instance.


Method Summary
 gPeak create(PeakData<gPeak> data, int index)
          Creates a new instance of the gPeak type and initiates it with the given PeakData instance and index indicating the location of the data associated to the new instance.
 java.lang.String getName()
          Returns the name of the type associated to the factory.
 java.lang.Class<gPeak> getPeakClass()
          Returns the Class instance of the generic type associated to the factory.
 

Method Detail

create

gPeak create(PeakData<gPeak> data,
             int index)
Creates a new instance of the gPeak type and initiates it with the given PeakData instance and index indicating the location of the data associated to the new instance.

Parameters:
data - The PeakData instance associated to the new instance.
index - The index of the data in the PeakData instance.
Returns:
A new instance of the generic gPeak type.

getName

java.lang.String getName()
Returns the name of the type associated to the factory.

Returns:
The name of the generic type associated to the factory.

getPeakClass

java.lang.Class<gPeak> getPeakClass()
Returns the Class instance of the generic type associated to the factory.

Returns:
The class of the generic type associated to the factory.