public static class SporeTarget.Constraint extends AbstractTarget.ConstraintAdapter implements Serializable
AbstractTarget.ConstraintAdapter.getMin()
AbstractTarget.ConstraintAdapter.getMax(), AbstractTarget.ConstraintAdapter.getFrom() and AbstractTarget.ConstraintAdapter.getTo(), or
AbstractTarget.ConstraintAdapter.getBelow() and AbstractTarget.ConstraintAdapter.getAbove() will return null except in the
valid parameter constraint. The remaining time may be queried with
Appointable.getRemainingTime(globals.GlobalGrouping) which will return zero if the parameter is out
of bounds.| Modifier and Type | Field and Description |
|---|---|
private long |
overdue
If remainig time of constraint can be relaxed, a value > 0.
|
private double |
relax
If remainig time of constraint can be relaxed, a value > 1.
|
private static long |
serialVersionUID |
| Constructor and Description |
|---|
Constraint(String val,
double loose,
long stride,
Number cmin,
Number cmax,
Number cfrom,
Number cto,
Number cbelow,
Number cabove)
Constructs a new constraints object giving the parameter name and
specifying one parameter constraint.
|
| Modifier and Type | Method and Description |
|---|---|
protected long |
getOverdue()
Returns a possible relaxation of the constraint on the remaining
time.
|
protected double |
getRelaxing()
Returns a possible relaxation of the constraint on the remaining
time.
|
long |
getTimeForConstraint(GlobalGrouping set,
TargetDefinition target)
Returns the time remaining for this constraint.
|
getAbove, getBelow, getFrom, getMax, getMin, getTo, getValueName, isSatisfied, toStringprivate static final long serialVersionUID
private final double relax
private final long overdue
public Constraint(String val, double loose, long stride, Number cmin, Number cmax, Number cfrom, Number cto, Number cbelow, Number cabove)
protected double getRelaxing()
protected long getOverdue()
public long getTimeForConstraint(GlobalGrouping set, TargetDefinition target)
AbstractTarget.ConstraintAdapter.valuename
. Then, the type of constraint is checked and the current value of
the parameter is checked against the constraints. If the parameter is
out of bounds, zero is returned. Otherwise, the parameter is checked
for being Increasing or
Decreasing. Depending on the
constraint type, this property of the parameter is used to fetch a
remaining time. If the parameter does not supply a
Increasing
or Decreasing information, the maximum time
is returned.getTimeForConstraint in interface Appointable.ConstraintgetTimeForConstraint in class AbstractTarget.ConstraintAdapter