Class StrengthVarSetImpl
- java.lang.Object
-
- cern.accsoft.steering.jmad.domain.var.custom.StrengthVarSetImpl
-
- All Implemented Interfaces:
StrengthVarSet
public class StrengthVarSetImpl extends java.lang.Object implements StrengthVarSet
The default implementation of aStrengthVarSet
-
-
Constructor Summary
Constructors Constructor Description StrengthVarSetImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAllStrengths(java.util.Collection<Strength> newStrengths)adds all the strengths and replaces variables and strengths of the same name.voidaddAllVariables(java.util.Collection<CustomVariable> newVariables)adds all the variables and replaces variables and strengths of the same name.voidclear()removes all the strengths and vars from the set.StrengthgetStrength(java.lang.String key)find the strength of the given keyjava.util.List<Strength>getStrengths()java.util.List<CustomVariable>getVariables()
-
-
-
Method Detail
-
addAllStrengths
public void addAllStrengths(java.util.Collection<Strength> newStrengths)
Description copied from interface:StrengthVarSetadds all the strengths and replaces variables and strengths of the same name.- Specified by:
addAllStrengthsin interfaceStrengthVarSet- Parameters:
newStrengths- the strengths to add
-
addAllVariables
public void addAllVariables(java.util.Collection<CustomVariable> newVariables)
Description copied from interface:StrengthVarSetadds all the variables and replaces variables and strengths of the same name.- Specified by:
addAllVariablesin interfaceStrengthVarSet- Parameters:
newVariables- the variables to add
-
getStrengths
public java.util.List<Strength> getStrengths()
- Specified by:
getStrengthsin interfaceStrengthVarSet- Returns:
- all the available strengths (e.g. read from a strength-file)
-
getVariables
public java.util.List<CustomVariable> getVariables()
- Specified by:
getVariablesin interfaceStrengthVarSet- Returns:
- all the available variables (e.g. read from a strength-file)
-
clear
public void clear()
Description copied from interface:StrengthVarSetremoves all the strengths and vars from the set.- Specified by:
clearin interfaceStrengthVarSet
-
getStrength
public Strength getStrength(java.lang.String key)
Description copied from interface:StrengthVarSetfind the strength of the given key- Specified by:
getStrengthin interfaceStrengthVarSet- Parameters:
key- the key of the strength- Returns:
- the strength or
nullif no strength was found for the give key.
-
-