View Javadoc
1   package org.opentrafficsim.kpi.sampling.indicator;
2   
3   import org.djunits.value.vdouble.scalar.AbstractDoubleScalarRel;
4   
5   /**
6    * Wrapper class for two typed values that represent a confidence interval.
7    * <p>
8    * Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
9    * BSD-style license. See <a href="http://opentrafficsim.org/node/13">OpenTrafficSim License</a>.
10   * <p>
11   * @version $Revision$, $LastChangedDate$, by $Author$, initial version 17 okt. 2016 <br>
12   * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
13   * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
14   * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a>
15   * @param <T> type of the values
16   */
17  public class ConfidenceInterval<T extends AbstractDoubleScalarRel<?, T>>
18  {
19  
20      /** Lower confidence value. */
21      private final T lowerValue;
22  
23      /** Upper confidence value. */
24      private final T upperValue;
25  
26      /**
27       * @param lowerValue lower confidence value
28       * @param upperValue upper confidence value
29       */
30      ConfidenceInterval(final T lowerValue, final T upperValue)
31      {
32          this.lowerValue = lowerValue;
33          this.upperValue = upperValue;
34      }
35  
36      /**
37       * @return lowerValue.
38       */
39      public T getLowerValue()
40      {
41          return this.lowerValue;
42      }
43  
44      /**
45       * @return upperValue.
46       */
47      public T getUpperValue()
48      {
49          return this.upperValue;
50      }
51  
52  }