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 void
addAllStrengths(java.util.Collection<Strength> newStrengths)
adds all the strengths and replaces variables and strengths of the same name.void
addAllVariables(java.util.Collection<CustomVariable> newVariables)
adds all the variables and replaces variables and strengths of the same name.void
clear()
removes all the strengths and vars from the set.Strength
getStrength(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:StrengthVarSet
adds all the strengths and replaces variables and strengths of the same name.- Specified by:
addAllStrengths
in interfaceStrengthVarSet
- Parameters:
newStrengths
- the strengths to add
-
addAllVariables
public void addAllVariables(java.util.Collection<CustomVariable> newVariables)
Description copied from interface:StrengthVarSet
adds all the variables and replaces variables and strengths of the same name.- Specified by:
addAllVariables
in interfaceStrengthVarSet
- Parameters:
newVariables
- the variables to add
-
getStrengths
public java.util.List<Strength> getStrengths()
- Specified by:
getStrengths
in interfaceStrengthVarSet
- Returns:
- all the available strengths (e.g. read from a strength-file)
-
getVariables
public java.util.List<CustomVariable> getVariables()
- Specified by:
getVariables
in interfaceStrengthVarSet
- Returns:
- all the available variables (e.g. read from a strength-file)
-
clear
public void clear()
Description copied from interface:StrengthVarSet
removes all the strengths and vars from the set.- Specified by:
clear
in interfaceStrengthVarSet
-
getStrength
public Strength getStrength(java.lang.String key)
Description copied from interface:StrengthVarSet
find the strength of the given key- Specified by:
getStrength
in interfaceStrengthVarSet
- Parameters:
key
- the key of the strength- Returns:
- the strength or
null
if no strength was found for the give key.
-
-