Interval { public Interval(final double lower, final double upper) { this.lower = lower; this.upper = upper; } Interval(final double lower, final double upper); double getInf(); @Deprecated double getLower(); double getSup(); @Deprecated double getUpper(); double getSize(); @Deprecated double getLength(); double getBarycenter(); @Deprecated double getMidPoint(); Location checkPoint(final double point, final double tolerance);  }
@Test public void testInterval() { Interval interval = new Interval(2.3, 5.7); Assert.assertEquals(3.4, interval.getSize(), 1.0e-10); Assert.assertEquals(4.0, interval.getBarycenter(), 1.0e-10); Assert.assertEquals(Region.Location.BOUNDARY, interval.checkPoint(2.3, 1.0e-10)); Assert.assertEquals(Region.Location.BOUNDARY, interval.checkPoint(5.7, 1.0e-10)); Assert.assertEquals(Region.Location.OUTSIDE, interval.checkPoint(1.2, 1.0e-10)); Assert.assertEquals(Region.Location.OUTSIDE, interval.checkPoint(8.7, 1.0e-10)); Assert.assertEquals(Region.Location.INSIDE, interval.checkPoint(3.0, 1.0e-10)); Assert.assertEquals(2.3, interval.getInf(), 1.0e-10); Assert.assertEquals(5.7, interval.getSup(), 1.0e-10); }