Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for rangeContaining (0.25 sec)

  1. android/guava-tests/test/com/google/common/collect/TreeRangeSetTest.java

        rangeSet.remove(Range.open(5, 7));
        assertEquals(Range.closed(3, 5), rangeSet.rangeContaining(5));
        assertTrue(rangeSet.contains(5));
        assertEquals(Range.closed(7, 10), rangeSet.rangeContaining(8));
        assertTrue(rangeSet.contains(8));
        assertNull(rangeSet.rangeContaining(6));
        assertFalse(rangeSet.contains(6));
      }
    
      public void testAddAll() {
        RangeSet<Integer> rangeSet = TreeRangeSet.create();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 24.3K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/RangeSet.java

      /**
       * Returns the unique range from this range set that {@linkplain Range#contains contains} {@code
       * value}, or {@code null} if this range set does not contain {@code value}.
       */
      @CheckForNull
      Range<C> rangeContaining(C value);
    
      /**
       * Returns {@code true} if there exists a non-empty range enclosed by both a member range in this
       * range set and the specified range. This is equivalent to calling {@code
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableRangeSet.java

                Ordering.natural(),
                ANY_PRESENT,
                NEXT_LOWER);
        return index != -1 && ranges.get(index).encloses(otherRange);
      }
    
      @Override
      @CheckForNull
      public Range<C> rangeContaining(C value) {
        int index =
            SortedLists.binarySearch(
                ranges,
                Range::lowerBound,
                Cut.belowValue(value),
                Ordering.natural(),
                ANY_PRESENT,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 27K bytes
    - Viewed (0)
Back to top