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