001package org.javasimon.callback.quantiles;
002
003/**
004 * {@link Bucket} sample.
005 *
006 * @author gquintana
007 * @since 3.3
008 */
009public final class BucketSample {
010
011        /** Minimal value. */
012        private final long min;
013        /** Maximal value. */
014        private final long max;
015        /** Number of values in the range min-max. */
016        private final int count;
017
018        /**
019         * Constructor with min/max value specified.
020         *
021         * @param min min value
022         * @param max max value
023         */
024        public BucketSample(long min, long max, int count) {
025                this.min = min;
026                this.max = max;
027                this.count = count;
028        }
029
030        /**
031         * Get number of values in the range.
032         *
033         * @return number of value in the range
034         */
035        public int getCount() {
036                return count;
037        }
038
039        /**
040         * Get upper bound of the range.
041         *
042         * @return max value
043         */
044        public long getMax() {
045                return max;
046        }
047
048        /**
049         * Get lower bound of the range.
050         *
051         * @return min value
052         */
053        public long getMin() {
054                return min;
055        }
056}