compbio.metadata
Class LimitsManager<T>

java.lang.Object
  extended by compbio.metadata.LimitsManager<T>
Type Parameters:
T - executable type

public class LimitsManager<T>
extends Object

A collection of Limits

Version:
1.0 January 2010
Author:
pvtroshin
See Also:
Limit

Constructor Summary
LimitsManager()
           
 
Method Summary
 Limit<T> getDefaultLimit()
           
 Limit<T> getLimitByName(String presetName)
           
 List<Limit<T>> getLimits()
           
 String toString()
           
 void validate(PresetManager<T> presets)
          Validate Limits
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LimitsManager

public LimitsManager()
Method Detail

getLimits

public List<Limit<T>> getLimits()
Returns:
all limits defined for an executable T

toString

public String toString()
Overrides:
toString in class Object

getLimitByName

public Limit<T> getLimitByName(String presetName)
Parameters:
presetName -
Returns:
Limit defined for the executable T and presetName. If no limit is defined for the presetName then default Limit is returned. If presetName is empty or null than the default Limit will be returned. If not limit defined for the type T than NULL will be returned

getDefaultLimit

public Limit<T> getDefaultLimit()
Returns:
the default Limit for an executable type T

validate

public void validate(PresetManager<T> presets)
              throws ValidationException
Validate Limits

Parameters:
presets -
Throws:
ValidationException - if any of the Limit defined is found to be invalid. That is when 1) No default limit is defined 2) More than 1 default limit is defined 3) Limit's preset name does not match any presets for type T
See Also:
Limit, Preset