Save This Page
Home » jcommon-1.0.13 » org.jfree » data » [javadoc | source]
org.jfree.data
public class: Range [javadoc | source]
java.lang.Object
   org.jfree.data.Range

All Implemented Interfaces:
    Serializable

Direct Known Subclasses:
    DateRange

Represents an immutable range of values.
Constructor:
 public Range(double lower,
    double upper) 
Method from org.jfree.data.Range Summary:
combine,   constrain,   contains,   equals,   expand,   expandToInclude,   getCentralValue,   getLength,   getLowerBound,   getUpperBound,   hashCode,   intersects,   intersects,   scale,   shift,   shift,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.data.Range Detail:
 public static Range combine(Range range1,
    Range range2) 
    Creates a new range by combining two existing ranges.

    Note that:

    • either range can be null, in which case the other range is returned;
    • if both ranges are null the return value is null.
 public double constrain(double value) 
    Returns the value within the range that is closest to the specified value.
 public boolean contains(double value) 
    Returns true if the range contains the specified value and false otherwise.
 public boolean equals(Object obj) 
    Tests this object for equality with an arbitrary object.
 public static Range expand(Range range,
    double lowerMargin,
    double upperMargin) 
    Creates a new range by adding margins to an existing range.
 public static Range expandToInclude(Range range,
    double value) 
    Returns a range that includes all the values in the specified range AND the specified value.
 public double getCentralValue() 
    Returns the central value for the range.
 public double getLength() 
    Returns the length of the range.
 public double getLowerBound() 
    Returns the lower bound for the range.
 public double getUpperBound() 
    Returns the upper bound for the range.
 public int hashCode() 
    Returns a hash code.
 public boolean intersects(Range range) 
    Returns true if the range intersects with the specified range, and false otherwise.
 public boolean intersects(double b0,
    double b1) 
    Returns true if the range intersects with the specified range, and false otherwise.
 public static Range scale(Range base,
    double factor) 
    Scales the range by the specified factor.
 public static Range shift(Range base,
    double delta) 
    Shifts the range by the specified amount.
 public static Range shift(Range base,
    double delta,
    boolean allowZeroCrossing) 
    Shifts the range by the specified amount.
 public String toString() 
    Returns a string representation of this Range.