public class PreferenceDomainBuilder extends java.lang.Object implements org.apache.commons.lang3.builder.Builder<PreferenceDomain>
Build a PreferenceDomain
.
Constructor and Description |
---|
PreferenceDomainBuilder()
Create an uninitialized preference domain builder.
|
PreferenceDomainBuilder(double min,
double max)
Create a preference domain builder with a specified minimum and maximum.
|
Modifier and Type | Method and Description |
---|---|
PreferenceDomain |
build() |
double |
getMaximum()
Get the maximum preference.
|
double |
getMinimum()
Get the minimum preference.
|
double |
getPrecision()
Get the preference precision.
|
PreferenceDomainBuilder |
setMaximum(double max)
Set the maximum preference.
|
PreferenceDomainBuilder |
setMinimum(double min)
Set the minimum preference.
|
PreferenceDomainBuilder |
setPrecision(double prec)
Set the preference precision.
|
public PreferenceDomainBuilder()
Create an uninitialized preference domain builder. The minimum and maximum must be provided before the build()
method may be called.
public PreferenceDomainBuilder(double min, double max)
Create a preference domain builder with a specified minimum and maximum.
min
- The minimum preference.max
- The maximum preference.public double getMinimum()
Get the minimum preference.
public PreferenceDomainBuilder setMinimum(double min)
Set the minimum preference.
min
- The minimum preference.public double getMaximum()
Get the maximum preference.
public PreferenceDomainBuilder setMaximum(double max)
Set the maximum preference.
max
- The maximum preference.public double getPrecision()
Get the preference precision.
public PreferenceDomainBuilder setPrecision(double prec)
Set the preference precision.
prec
- The preference precision, or Double.NaN
for unlimited precision.public PreferenceDomain build()
build
in interface org.apache.commons.lang3.builder.Builder<PreferenceDomain>