Summ:  Fields Constr. Methods    Details:  Fields Constr. Methods      Class:  Prev Next
com.artfulbits.aiCharts.Base
Class DoubleRange

java.lang.Object com.artfulbits.aiCharts.Base.DoubleRange

Declaration: public final class DoubleRange extends Object

 

Represents double range class used to identify range within two double values.

 

Since: 1.0

 

 

Fields Summary
double Maximum
    
Represents ending value of range.
double Minimum
    
Represents starting value of range.

 

 

Constructors Summary
DoubleRange(double min, double max)
    
Initializes a new instance of DoubleRange class with specified parameters.

 

 

Methods Summary
double center()
    
Gets the center value of this range.
double extrapolate(double value)
    
Extrapolates value to this range.
double getDelta()
    
Gets the difference between start and end values.
double interpolate(double value)
    
Interpolates value on this range.
DoubleRange union(double value)
    
Extends the range that it includes specified value.
DoubleRange union(double min, double max)
    
Extends range with specified max and min values.
DoubleRange union(DoubleRange range)
    
Extends range with specified one.
static DoubleRange union(DoubleRange range1, DoubleRange range2)
    
Joins both ranges in a single one.

 

Methods inherited from class: java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

 

 

 

Minimum

 

public final double Minimum

 

Represents starting value of range.

 

See also: Minimum

 

 

 

Maximum

 

public final double Maximum

 

Represents ending value of range.

 

See also: Maximum

 

 

 

 

DoubleRange

 

public DoubleRange( double min,
double max)

 

Initializes a new instance of DoubleRange class with specified parameters. If max < min, values are swapped automatically.

 

Parameters:
min-
starting range value.
max-
ending range value.

 

Since: 1.0
See also: MaximumMinimum

 

 

 

 

center

 

public double center( )

 

Gets the center value of this range.

 

Returns:
center of range value.

 

Since: 1.0

 

 

 

getDelta

 

public double getDelta( )

 

Gets the difference between start and end values.

 

Returns:
difference that ramge represents.

 

Since: 1.0

 

 

 

union

 

public DoubleRange union( double min,
double max)

 

Extends range with specified max and min values.

 

Parameters:
min-
staring value of extending range.
max-
ending value of extending range.
Returns:
instance of DoubleRange that includes passed interval.

 

Since: 1.0

 

 

 

union

 

public DoubleRange union( double value)

 

Extends the range that it includes specified value.

 

Parameters:
value-
value that is to be included to range.
Returns:
instance of DoubleRange representing extended range.

 

Since: 1.0

 

 

 

union

 

public DoubleRange union( DoubleRange range)

 

Extends range with specified one.

 

Parameters:
range-
extending range.
Returns:
instance of DoubleRange that includes specified range.

 

Since: 1.0

 

 

 

union

 

public static DoubleRange union( DoubleRange range1,
DoubleRange range2)

 

Joins both ranges in a single one.

 

Parameters:
range1-
first range to join.
range2-
second range to join.
Returns:
instance of DoubleRange that includes both specified ranges.

 

Since: 1.0

 

 

 

interpolate

 

public double interpolate( double value)

 

Interpolates value on this range.

 

Parameters:
value-
value to interpolate.
Returns:
interpolated value.

 

Since: 1.0

 

 

 

extrapolate

 

public double extrapolate( double value)

 

Extrapolates value to this range.

 

Parameters:
value-
to extrapolate.
Returns:
extrapolated value.

 

Since: 1.0

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.