public class Threshold<T> extends Object implements CommonAttributes, Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Threshold.Type
xmcda:element:threshold/affine/type
|
| Constructor and Description |
|---|
Threshold(QualifiedValue<T> constant) |
Threshold(QualifiedValue<T> slope,
QualifiedValue<T> intercept) |
Threshold(Threshold.Type type,
QualifiedValue<T> slope,
QualifiedValue<T> intercept) |
| Modifier and Type | Method and Description |
|---|---|
QualifiedValue<T> |
getConstant()
Returns the constant value for this threshold.
|
QualifiedValue<T> |
getIntercept()
Returns the intercept of the threshold's affine function.
|
QualifiedValue<T> |
getSlope()
Returns the slope of the threshold's affine function.
|
Threshold.Type |
getType()
Returns the type of the affine threshold.
|
String |
id() |
boolean |
isAffine() |
boolean |
isConstant() |
String |
mcdaConcept() |
String |
name() |
protected void |
reset()
Resets all attributes to
null. |
void |
setAffine(QualifiedValue<T> slope,
QualifiedValue<T> intercept)
Sets the slope and intercept for an affine threshold.
|
void |
setAffine(Threshold.Type type,
QualifiedValue<T> slope,
QualifiedValue<T> intercept)
Sets the slope, intercept and type for an affine threshold.
|
void |
setConstant(QualifiedValue<T> constant)
Sets the value corresponding to a constant thresholds.
|
void |
setId(String id) |
void |
setMcdaConcept(String mcdaConcept) |
void |
setName(String name) |
void |
setType(Threshold.Type type)
Sets the threshold's type.
|
public Threshold(QualifiedValue<T> constant)
public Threshold(QualifiedValue<T> slope, QualifiedValue<T> intercept)
public Threshold(Threshold.Type type, QualifiedValue<T> slope, QualifiedValue<T> intercept)
protected void reset()
null. This method must be called before setting any of the attributes
'constant', 'type', 'slope' or 'intercept'.public boolean isConstant()
public boolean isAffine()
public QualifiedValue<T> getConstant()
null if the threshold is not a
constant but an affine function.null if this is an affine threshold.public void setConstant(QualifiedValue<T> constant)
constant - the constant value for this threshold.NullPointerException - if constant] is nullpublic Threshold.Type getType()
null if the threshold is a constant.public QualifiedValue<T> getSlope()
null if the threshold
is a constant.null if the threshold is a constant.public QualifiedValue<T> getIntercept()
null if the
threshold is a constant.null if the threshold is a constant.public void setAffine(QualifiedValue<T> slope, QualifiedValue<T> intercept)
type is set to
.slope - the slope for this affine thresholdintercept - the intercept value for this affine thresholdNullPointerException - if either slope or intercept is null.public void setAffine(Threshold.Type type, QualifiedValue<T> slope, QualifiedValue<T> intercept)
type is set to
.slope - the slope for this affine threshold. It may not be null.intercept - the intercept value for this affine threshold. It may not be null.type - the threshold's type. It may not be null.NullPointerException - if either slope, intercept or type is null.public void setType(Threshold.Type type)
type - the threshold's type. It may not be null.IllegalStateException - if the threshold is not an affine function.NullPointerException - if the type is null.public String id()
id in interface CommonAttributespublic void setId(String id)
setId in interface CommonAttributespublic String name()
name in interface CommonAttributespublic String mcdaConcept()
mcdaConcept in interface CommonAttributespublic void setName(String name)
setName in interface CommonAttributespublic void setMcdaConcept(String mcdaConcept)
setMcdaConcept in interface CommonAttributesCopyright © 2013–2021 Sébastien Bigaret, Patrick Meyer. All rights reserved.