Interface IRange<T>
Defines the base interface to a Range (min, max), used throughout SciChart for visible, data and index range calculations
Implements
Namespace:
Assembly: .dll
Syntax
public interface IRange<T> extends Cloneable
Type Parameters
Name | Description |
---|---|
T |
Methods
addRangeChangeObserver(IRangeChangeObserver<T> observer)
Adds IRangeChangeObserver instance to listen changes of this IRange instance
Declaration
public abstract void addRangeChangeObserver(IRangeChangeObserver<T> observer)
Parameters
Type | Name | Description |
---|---|---|
IRangeChangeObserver<T> | observer | The observer to add |
clipTo(IRange<T> maximumRange)
Clips the current com.scichart.data.model.IRange to a maximum range with MinMax mode
Declaration
public abstract void clipTo(IRange<T> maximumRange)
Parameters
Type | Name | Description |
---|---|---|
IRange<T> | maximumRange | range to compare |
clipTo(IRange<T> maximumRange, RangeClipMode clipMode)
Clips the current com.scichart.data.model.IRange to a maximum according to clip mode
Declaration
public abstract void clipTo(IRange<T> maximumRange, RangeClipMode clipMode)
Parameters
Type | Name | Description |
---|---|---|
IRange<T> | maximumRange | range to compare |
RangeClipMode | clipMode | clip mode which defines how to clip range |
clone()
Creates and returns a copy of this object
Declaration
public abstract IRange<T> clone()
Returns
Type | Description |
---|---|
IRange<T> | A clone of this instance. |
Exceptions
Type | Condition |
---|---|
CloneNotSupportedException | if the object's class does not
support the |
getDiff()
Gets the difference (max - min) of this range
Declaration
public abstract T getDiff()
Returns
Type | Description |
---|---|
T | difference max - min |
getIsDefined()
Gets whether this Range is defined
Declaration
public abstract boolean getIsDefined()
Returns
Type | Description |
---|---|
boolean | true when this Range is defined |
getIsMinMaxValid()
Gets whether the min and max value are valid ( min <= max )
Declaration
public abstract boolean getIsMinMaxValid()
Returns
Type | Description |
---|---|
boolean | True if min and max values are valid |
getIsZero()
Gets whether the range is Zero, where max equals min
Declaration
public abstract boolean getIsZero()
Returns
Type | Description |
---|---|
boolean | true when the range is Zero |
getMath()
Gets the IMath associated with this range
Declaration
public abstract IMath<T> getMath()
Returns
Type | Description |
---|---|
IMath<T> | The IMath instance |
getMax()
Gets the max value of this range
Declaration
public abstract T getMax()
Returns
Type | Description |
---|---|
T | max value of this range |
getMaxAsDouble()
Gets the double representation of max value
Declaration
public abstract double getMaxAsDouble()
Returns
Type | Description |
---|---|
double | The double representation of max value |
getMin()
Gets the min value of this range
Declaration
public abstract T getMin()
Returns
Type | Description |
---|---|
T | min value of this range |
getMinAsDouble()
Gets the double representation of min value
Declaration
public abstract double getMinAsDouble()
Returns
Type | Description |
---|---|
double | The double representation of min value |
getValueType()
Gets the type of range values
Declaration
public abstract Class<T> getValueType()
Returns
Type | Description |
---|---|
Class<T> | The type of range values |
growBy(double minFraction, double maxFraction)
Grows the current com.scichart.data.model.IRange by the min and max fraction
Declaration
public abstract void growBy(double minFraction, double maxFraction)
Parameters
Type | Name | Description |
---|---|---|
double | minFraction | The min fraction to grow by. For example, min = -10 and minFraction = 0.1 will result in the new min = -11 |
double | maxFraction | The max fraction to grow by. For example, max = 10 and minFraction = 0.2 will result in the new max = 12 |
isValueWithinRange(T value)
Returns true if the value is within the min and max of the Range
Declaration
public abstract boolean isValueWithinRange(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | the value to test |
Returns
Type | Description |
---|---|
boolean | true if the value is within the Min and Max of the Range |
removeRangeChangeObserver(IRangeChangeObserver<T> observer)
Removes IRangeChangeObserver instance from list of change listeners for this IRange instance
Declaration
public abstract void removeRangeChangeObserver(IRangeChangeObserver<T> observer)
Parameters
Type | Name | Description |
---|---|---|
IRangeChangeObserver<T> | observer | The observer to remove |
set(IRange<T> range)
Sets the min, max values on the com.scichart.data.model.IRange with a range
Declaration
public abstract void set(IRange<T> range)
Parameters
Type | Name | Description |
---|---|---|
IRange<T> | range | input range |
setMax(T max)
Sets the max value of this range
Declaration
public abstract void setMax(T max)
Parameters
Type | Name | Description |
---|---|---|
T | max | value to be set |
setMin(T min)
Sets the min value of this range
Declaration
public abstract void setMin(T min)
Parameters
Type | Name | Description |
---|---|---|
T | min | value to be set |
setMinMax(T min, T max)
Sets the min, max values on the com.scichart.data.model.IRange
Declaration
public abstract void setMinMax(T min, T max)
Parameters
Type | Name | Description |
---|---|---|
T | min | New min value |
T | max | New max value |
setMinMaxDouble(double min, double max)
Sets the min, max values on the com.scichart.data.model.IRange
Declaration
public abstract void setMinMaxDouble(double min, double max)
Parameters
Type | Name | Description |
---|---|---|
double | min | New min value |
double | max | New max value |
setMinMaxDoubleForced(double min, double max)
Sets the min, max values on the com.scichart.data.model.IRange without equals checks
Declaration
public abstract void setMinMaxDoubleForced(double min, double max)
Parameters
Type | Name | Description |
---|---|---|
double | min | New min value |
double | max | New max value |
setMinMaxForced(T min, T max)
Sets the min, max values on the com.scichart.data.model.IRange without equals checks
Declaration
public abstract void setMinMaxForced(T min, T max)
Parameters
Type | Name | Description |
---|---|---|
T | min | New min value |
T | max | New max value |
setMinMaxWithLimit(double min, double max, IRange<T> maximumRange)
Sets the min, max values on the com.scichart.data.model.IRange with a max range to clip values to
Declaration
public abstract void setMinMaxWithLimit(double min, double max, IRange<T> maximumRange)
Parameters
Type | Name | Description |
---|---|---|
double | min | New min value |
double | max | New max value |
IRange<T> | maximumRange | The max range, which is used to clip values |
union(T min, T max)
Performs the union of two com.scichart.data.model.IRange instances
Declaration
public abstract void union(T min, T max)
Parameters
Type | Name | Description |
---|---|---|
T | min | The min value |
T | max | The max value |
union(IRange<T> range)
Performs the union of two com.scichart.data.model.IRange instances
Declaration
public abstract void union(IRange<T> range)
Parameters
Type | Name | Description |
---|---|---|
IRange<T> | range | input range |