Package org.hipparchus.ode
Class AbstractParameterizable
- java.lang.Object
-
- org.hipparchus.ode.AbstractParameterizable
-
- All Implemented Interfaces:
Parameterizable
public abstract class AbstractParameterizable extends Object implements Parameterizable
This abstract class provides boilerplate parameters list.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractParameterizable(String... names)
Simple constructor.protected
AbstractParameterizable(Collection<String> names)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
complainIfNotSupported(String name)
Check if a parameter is supported and throw an IllegalArgumentException if not.List<String>
getParametersNames()
Get the names of the supported parameters.boolean
isSupported(String name)
Check if a parameter is supported.
-
-
-
Constructor Detail
-
AbstractParameterizable
protected AbstractParameterizable(String... names)
Simple constructor.- Parameters:
names
- names of the supported parameters
-
AbstractParameterizable
protected AbstractParameterizable(Collection<String> names)
Simple constructor.- Parameters:
names
- names of the supported parameters
-
-
Method Detail
-
getParametersNames
public List<String> getParametersNames()
Get the names of the supported parameters.- Specified by:
getParametersNames
in interfaceParameterizable
- Returns:
- parameters names
- See Also:
Parameterizable.isSupported(String)
-
isSupported
public boolean isSupported(String name)
Check if a parameter is supported.Supported parameters are those listed by
Parameterizable.getParametersNames()
.- Specified by:
isSupported
in interfaceParameterizable
- Parameters:
name
- parameter name to check- Returns:
- true if the parameter is supported
- See Also:
Parameterizable.getParametersNames()
-
complainIfNotSupported
public void complainIfNotSupported(String name) throws MathIllegalArgumentException
Check if a parameter is supported and throw an IllegalArgumentException if not.- Parameters:
name
- name of the parameter to check- Throws:
MathIllegalArgumentException
- if the parameter is not supported- See Also:
isSupported(String)
-
-