afreechart/src/main/java/org/afree/data/general/DatasetUtilities.java
/**
     * Returns the range of values in the domain (x-values) of a dataset.
     * 
     * @param dataset
     *            the dataset (<code>null</code> not permitted).
     * @param includeInterval
     *            determines whether or not the x-interval is taken into account
     *            (only applies if the dataset is an {@link IntervalXYDataset}).
     * 
     * @return The range of values (possibly <code>null</code>).
     */
Returns the range of values in the domain (x-values) of a dataset.

@param dataset
the dataset (null not permitted).
@param includeInterval
determines whether or not the x-interval is taken into account
(only applies if the dataset is an  IntervalXYDataset).

@return The range of values (possibly null).
Returns the range of values in the domain ( x - values ) of a dataset . @param dataset the dataset ( null not permitted ) . @param includeInterval determines whether or not the x - interval is taken into account ( only applies if the dataset is an IntervalXYDataset ) . @return The range of values ( possibly null ) .
public static Range findDomainBounds(XYDataset dataset,
            boolean includeInterval) {
        if (dataset == null) {
            throw new IllegalArgumentException("Null 'dataset' argument.");
        }
        Range result = null;
        if (dataset instanceof DomainInfo) {
            DomainInfo info = (DomainInfo) dataset;
            result = info.getDomainBounds(includeInterval);
        } else {
            result = iterateDomainBounds(dataset, includeInterval);
        }
        return result;
    }
public static Range findDomainBounds ( XYDataset dataset , boolean includeInterval ) { if ( dataset == null ) { throw new IllegalArgumentException ( "Null 'dataset' argument." ) ; } Range result = null ; if ( dataset instanceof DomainInfo ) { DomainInfo info = ( DomainInfo ) dataset ; result = info . getDomainBounds ( includeInterval ) ; } else { result = iterateDomainBounds ( dataset , includeInterval ) ; } return result ; }
Returns the range of values in the domain (x-values) of a dataset.
Returns the range of values in the domain ( x - values ) of a dataset .
// if the dataset implements DomainInfo, life is easier