public final class SimpleGapFunction extends GapFunction
true,
otherwise it returns false.| Modifier and Type | Field and Description |
|---|---|
protected PropertyChangeSupport |
changes |
DEFAULT| Constructor and Description |
|---|
SimpleGapFunction()
Instantiates an instance with the default maximum gap and units.
|
SimpleGapFunction(Integer maximumGap,
Unit maximumGapUnit)
Initializes a gap function with a maximum gap and units.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
execute(Interval lhs,
Interval rhs)
Executes the gap function.
|
Integer |
getMaximumGap()
Returns the gap function's maximum gap value.
|
Unit |
getMaximumGapUnit()
Returns the units of the maximum gap value.
|
void |
setMaximumGap(Integer maximumGap)
Sets the the gap function's maximum gap value.
|
void |
setMaximumGapUnit(Unit unit)
Sets the maximum gap value's units.
|
String |
toString() |
executeprotected final PropertyChangeSupport changes
public SimpleGapFunction()
null, which means any gap will
cause the gap function to return true. The default units
is null, the meaning of which is defined by the
Granularity of the data.public boolean execute(Interval lhs, Interval rhs)
lhs) is
before the second (rhs) and the distance between them is
less than or equal to the maximumGap, then
this method returns true, otherwise it returns
false.execute in class GapFunctionlhs - the first Interval.rhs - the second Interval.true or false.public Integer getMaximumGap()
null, which means any gap.Integer.public Unit getMaximumGapUnit()
null, which means milliseconds.Unit.public void setMaximumGap(Integer maximumGap)
null means any gap.maximumGap - the maximum gap Integer. Must be non-negative.
If set to zero, the gap function always will return false.public void setMaximumGapUnit(Unit unit)
null means
milliseconds.unit - a Unit value.Copyright © 2012–2017 Emory University. All rights reserved.