public boolean contains(K value) {
      return (includeLower ? low.compareTo(value) <= 0 : low.compareTo(value) < 0)
            && (includeUpper ? up.compareTo(value) >= 0 : up.compareTo(value) > 0);
   }
@Test
   public void testContains() {
      assertTrue(new Interval(Interval.<Integer>getMinusInf(), false, 1000, false).contains(20));
      assertFalse(new Interval(Interval.<Integer>getMinusInf(), false, 1000, false).contains(1000));
      assertFalse(new Interval(Interval.<Integer>getMinusInf(), false, 1000, false).contains(1001));

      assertTrue(new Interval(1000, false, Interval.<Integer>getPlusInf(), false).contains(2000));
      assertFalse(new Interval(1000, false, Interval.<Integer>getPlusInf(), false).contains(1000));
      assertFalse(new Interval(1000, false, Interval.<Integer>getPlusInf(), false).contains(999));
   }