Module datarush.analytics
Class Interval<T extends Number & Comparable<? super T>>
java.lang.Object
com.pervasive.datarush.analytics.stats.Interval<T>
- All Implemented Interfaces:
Serializable,Comparable<Interval<T>>
public final class Interval<T extends Number & Comparable<? super T>>
extends Object
implements Comparable<Interval<T>>, Serializable
Object representation of the PMML
Interval element.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of allowed values for the "closure" attribute of theIntervalelement. -
Constructor Summary
ConstructorsConstructorDescriptionInterval(Interval.Closure closure, T leftMargin, T rightMargin) Creates a new interval -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Number & Comparable<? super T>>
Interval<T>closedClosed(T left, T right) Creates an interval [left,right]static <T extends Number & Comparable<? super T>>
Interval<T>closedOpen(T left, T right) Creates an interval [left,right)intFirst compares the left margins, then the right margins.booleanTwo intervals are equal if they have the same lower bound, upper bound, and closure.Returns the closure of the intervalReturns the lower bound of the intervalClass<?>booleanReturns the upper bound of the intervalinthashCode()Returns hashCode consistent with equals.static <T extends Number & Comparable<? super T>>
Interval<T>openClosed(T left, T right) Creates an interval (left,right]static <T extends Number & Comparable<? super T>>
Interval<T>openOpen(T left, T right) Creates an interval (left,right)voidsetOutlier(boolean outlier) toString()Returns a pretty-printed string of the form[lower,upper]
-
Constructor Details
-
Interval
Creates a new interval- Parameters:
closure- the closure of the intervalleftMargin- the lower bound of the intervalrightMargin- the upper bound of the interval
-
-
Method Details
-
openClosed
Creates an interval (left,right]- Parameters:
left- the leftright- the right- Returns:
- an internal (left,right]
-
openOpen
Creates an interval (left,right)- Parameters:
left- the leftright- the right- Returns:
- an internal (left,right)
-
closedOpen
Creates an interval [left,right)- Parameters:
left- the leftright- the right- Returns:
- an internal [left,right)
-
closedClosed
Creates an interval [left,right]- Parameters:
left- the leftright- the right- Returns:
- an internal [left,right]
-
getClosure
Returns the closure of the interval- Returns:
- the closure of the interval
-
getLeftMargin
Returns the lower bound of the interval- Returns:
- the lower bound of the interval
-
getRightMargin
Returns the upper bound of the interval- Returns:
- the upper bound of the interval
-
getNumericType
-
equals
Two intervals are equal if they have the same lower bound, upper bound, and closure. -
hashCode
public int hashCode()Returns hashCode consistent with equals. -
compareTo
First compares the left margins, then the right margins. Closure is not considered when comparing intervals.- Specified by:
compareToin interfaceComparable<T extends Number & Comparable<? super T>>
-
toString
Returns a pretty-printed string of the form[lower,upper] -
getOutlier
public boolean getOutlier() -
setOutlier
public void setOutlier(boolean outlier)
-