/** * Sets minimum allowed value for this datasource. If <code>filterArchivedValues</code> * argument is set to true, all archived values less then <code>minValue</code> will * be fixed to NaN. * * @param minValue New minimal value. Specify <code>Double.NaN</code> if no minimal * value should be set * @param filterArchivedValues true, if archived datasource values should be fixed; * false, otherwise. * @throws java.io.IOException Thrown in case of I/O error * @throws java.lang.IllegalArgumentException Thrown if invalid minValue was supplied (not less then maxValue) */ public void setMinValue(double minValue, boolean filterArchivedValues) throws IOException { double maxValue = this.maxValue.get(); if (!Double.isNaN(minValue) && !Double.isNaN(maxValue) && minValue >= maxValue) { throw new IllegalArgumentException(INVALID_MIN_MAX_VALUES + minValue + "/" + maxValue); } this.minValue.set(minValue); if (!Double.isNaN(minValue) && filterArchivedValues) { int dsIndex = getDsIndex(); Archive[] archives = parentDb.getArchives(); for (Archive archive : archives) { archive.getRobin(dsIndex).filterValues(minValue, Double.NaN); } } }
/** * Sets maximum allowed value for this datasource. If <code>filterArchivedValues</code> * argment is set to true, all archived values greater then <code>maxValue</code> will * be fixed to NaN. * * @param maxValue New maximal value. Specify <code>Double.NaN</code> if no max * value should be set. * @param filterArchivedValues true, if archived datasource values should be fixed; * false, otherwise. * @throws IOException Thrown in case of I/O error * @throws IllegalArgumentException Thrown if invalid maxValue was supplied (not greater then minValue) */ public void setMaxValue(double maxValue, boolean filterArchivedValues) throws IOException { double minValue = this.minValue.get(); if (!Double.isNaN(minValue) && !Double.isNaN(maxValue) && minValue >= maxValue) { throw new IllegalArgumentException("Invalid min/max values: " + minValue + "/" + maxValue); } this.maxValue.set(maxValue); if (!Double.isNaN(maxValue) && filterArchivedValues) { int dsIndex = getDsIndex(); Archive[] archives = parentDb.getArchives(); for (Archive archive : archives) { archive.getRobin(dsIndex).filterValues(Double.NaN, maxValue); } } }
/** * Sets min/max values allowed for this datasource. If <code>filterArchivedValues</code> * argument is set to true, all archived values less then <code>minValue</code> or * greater then <code>maxValue</code> will be fixed to NaN. * * @param minValue New minimal value. Specify <code>Double.NaN</code> if no min * value should be set. * @param maxValue New maximal value. Specify <code>Double.NaN</code> if no max * value should be set. * @param filterArchivedValues true, if archived datasource values should be fixed; * false, otherwise. * @throws java.io.IOException Thrown in case of I/O error * @throws java.lang.IllegalArgumentException Thrown if invalid min/max values were supplied */ public void setMinMaxValue(double minValue, double maxValue, boolean filterArchivedValues) throws IOException { if (!Double.isNaN(minValue) && !Double.isNaN(maxValue) && minValue >= maxValue) { throw new IllegalArgumentException(INVALID_MIN_MAX_VALUES + minValue + "/" + maxValue); } this.minValue.set(minValue); this.maxValue.set(maxValue); if (!(Double.isNaN(minValue) && Double.isNaN(maxValue)) && filterArchivedValues) { int dsIndex = getDsIndex(); Archive[] archives = parentDb.getArchives(); for (Archive archive : archives) { archive.getRobin(dsIndex).filterValues(minValue, maxValue); } } }
/** * Sets min/max values allowed for this datasource. If <code>filterArchivedValues</code> * argment is set to true, all archived values less then <code>minValue</code> or * greater then <code>maxValue</code> will be fixed to NaN. * * @param minValue New minimal value. Specify <code>Double.NaN</code> if no min * value should be set. * @param maxValue New maximal value. Specify <code>Double.NaN</code> if no max * value should be set. * @param filterArchivedValues true, if archived datasource values should be fixed; * false, otherwise. * @throws IOException Thrown in case of I/O error * @throws IllegalArgumentException Thrown if invalid min/max values were supplied */ public void setMinMaxValue(double minValue, double maxValue, boolean filterArchivedValues) throws IOException { if (!Double.isNaN(minValue) && !Double.isNaN(maxValue) && minValue >= maxValue) { throw new IllegalArgumentException("Invalid min/max values: " + minValue + "/" + maxValue); } this.minValue.set(minValue); this.maxValue.set(maxValue); if (!(Double.isNaN(minValue) && Double.isNaN(maxValue)) && filterArchivedValues) { int dsIndex = getDsIndex(); Archive[] archives = parentDb.getArchives(); for (Archive archive : archives) { archive.getRobin(dsIndex).filterValues(minValue, maxValue); } } }
/** * Sets maximum allowed value for this datasource. If <code>filterArchivedValues</code> * argument is set to true, all archived values greater then <code>maxValue</code> will * be fixed to NaN. * * @param maxValue New maximal value. Specify <code>Double.NaN</code> if no max * value should be set. * @param filterArchivedValues true, if archived datasource values should be fixed; * false, otherwise. * @throws java.io.IOException Thrown in case of I/O error * @throws java.lang.IllegalArgumentException Thrown if invalid maxValue was supplied (not greater then minValue) */ public void setMaxValue(double maxValue, boolean filterArchivedValues) throws IOException { double minValue = this.minValue.get(); if (!Double.isNaN(minValue) && !Double.isNaN(maxValue) && minValue >= maxValue) { throw new IllegalArgumentException(INVALID_MIN_MAX_VALUES + minValue + "/" + maxValue); } this.maxValue.set(maxValue); if (!Double.isNaN(maxValue) && filterArchivedValues) { int dsIndex = getDsIndex(); Archive[] archives = parentDb.getArchives(); for (Archive archive : archives) { archive.getRobin(dsIndex).filterValues(Double.NaN, maxValue); } } }
/** * Sets minimum allowed value for this datasource. If <code>filterArchivedValues</code> * argment is set to true, all archived values less then <code>minValue</code> will * be fixed to NaN. * * @param minValue New minimal value. Specify <code>Double.NaN</code> if no minimal * value should be set * @param filterArchivedValues true, if archived datasource values should be fixed; * false, otherwise. * @throws IOException Thrown in case of I/O error * @throws IllegalArgumentException Thrown if invalid minValue was supplied (not less then maxValue) */ public void setMinValue(double minValue, boolean filterArchivedValues) throws IOException { double maxValue = this.maxValue.get(); if (!Double.isNaN(minValue) && !Double.isNaN(maxValue) && minValue >= maxValue) { throw new IllegalArgumentException("Invalid min/max values: " + minValue + "/" + maxValue); } this.minValue.set(minValue); if (!Double.isNaN(minValue) && filterArchivedValues) { int dsIndex = getDsIndex(); Archive[] archives = parentDb.getArchives(); for (Archive archive : archives) { archive.getRobin(dsIndex).filterValues(minValue, Double.NaN); } } }