EnumeratedRealDistribution extends AbstractRealDistribution { public double getSupportUpperBound() { double max = Double.NEGATIVE_INFINITY; for (final Pair<Double, Double> sample : innerDistribution.getPmf()) { if (sample.getKey() > max && sample.getValue() > 0) { max = sample.getKey(); } } return max; } EnumeratedRealDistribution(final double[] singletons, final double[] probabilities);  EnumeratedRealDistribution(final RandomGenerator rng,
                                    final double[] singletons, final double[] probabilities); @Override double probability(final double x); double density(final double x); double cumulativeProbability(final double x); @Override double inverseCumulativeProbability(final double p); double getNumericalMean(); double getNumericalVariance(); double getSupportLowerBound(); double getSupportUpperBound(); boolean isSupportLowerBoundInclusive(); boolean isSupportUpperBoundInclusive(); boolean isSupportConnected(); @Override double sample();  }
@Test public void testGetSupportUpperBound() { Assert.assertEquals(7, testDistribution.getSupportUpperBound(), 0); }