peakml
Class Centroid.Factory

java.lang.Object
  extended by peakml.Centroid.Factory
All Implemented Interfaces:
PeakData.PeakFactory<Centroid>
Enclosing class:
Centroid

public static class Centroid.Factory
extends java.lang.Object
implements PeakData.PeakFactory<Centroid>

Factory for creating a Centroid instance. This construct is needed to separate object creation from the implementation in PeakData.


Constructor Summary
Centroid.Factory()
           
 
Method Summary
 Centroid create(PeakData<Centroid> data, int index)
          PeakData.PeakFactory.create(PeakData, int)
 java.lang.String getName()
          PeakData.PeakFactory.getName()
 java.lang.Class<Centroid> getPeakClass()
          PeakData.PeakFactory.getPeakClass()
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Centroid.Factory

public Centroid.Factory()
Method Detail

create

public Centroid create(PeakData<Centroid> data,
                       int index)
PeakData.PeakFactory.create(PeakData, int)

Specified by:
create in interface PeakData.PeakFactory<Centroid>
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

public java.lang.String getName()
PeakData.PeakFactory.getName()

Specified by:
getName in interface PeakData.PeakFactory<Centroid>
Returns:
The name of the generic type associated to the factory.

getPeakClass

public java.lang.Class<Centroid> getPeakClass()
PeakData.PeakFactory.getPeakClass()

Specified by:
getPeakClass in interface PeakData.PeakFactory<Centroid>
Returns:
The class of the generic type associated to the factory.