public static Range findDomainBounds(XYDataset dataset,
List<Comparable> visibleSeriesKeys, boolean includeInterval) {
ParamChecks.nullNotPermitted(dataset, "dataset");
Range result;
if (dataset instanceof XYDomainInfo) {
XYDomainInfo info = (XYDomainInfo) dataset;
result = info.getDomainBounds(visibleSeriesKeys, includeInterval);
}
else {
result = iterateToFindDomainBounds(dataset, visibleSeriesKeys,
includeInterval);
}