Class ScaleType.Param
java.lang.Object
uk.ac.starlink.ttools.plot2.ScaleType.Param
- Enclosing class:
ScaleType
Defines a numerical parameter for a ScaleType.
To create a Scale instance, a value for each Param needs to be
supplied to the ScaleType.
- Since:
- 20 Mar 2025
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the parameter default value.Returns a short description of this parameter.getName()Returns the parameter name.abstract doublenextDown(double d) Given a value for this parameter, returns a smaller number that would be a suitable value.abstract doublenextUp(double d) Given a value for this parameter, returns a larger number that would be a suitable value.toString()
-
Constructor Details
-
Param
-
-
Method Details
-
getName
-
getDefault
public double getDefault()Returns the parameter default value.- Returns:
- default value
-
getDescription
-
nextDown
public abstract double nextDown(double d) Given a value for this parameter, returns a smaller number that would be a suitable value.This is used for the GUI. The scaling will still work, though the GUI will be suboptimal, if this is implemented as the identity.
- Parameters:
d- example parameter value- Returns:
- round number smaller than
d
-
nextUp
public abstract double nextUp(double d) Given a value for this parameter, returns a larger number that would be a suitable value.This is used for the GUI. The scaling will still work, though the GUI will be suboptimal, if this is implemented as the identity.
- Parameters:
d- example parameter value- Returns:
- round number greater than
d
-
toString
-