Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for RangeSet (0.06 sec)

  1. guava/src/com/google/common/collect/RangeSet.java

     *
     * <pre>{@code
     * RangeSet<Integer> rangeSet = TreeRangeSet.create();
     * rangeSet.add(Range.closed(1, 10)); // {[1, 10]}
     * rangeSet.add(Range.closedOpen(11, 15)); // disconnected range; {[1, 10], [11, 15)}
     * rangeSet.add(Range.closedOpen(15, 20)); // connected range; {[1, 10], [11, 20)}
     * rangeSet.add(Range.openClosed(0, 0)); // empty range; {[1, 10], [11, 20)}
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/ImmutableRangeSetTest.java

        assertTrue(rangeSet.intersects(Range.greaterThan(1)));
        assertFalse(rangeSet.intersects(Range.greaterThan(3)));
    
        assertTrue(rangeSet.encloses(Range.closed(2, 3)));
        assertTrue(rangeSet.encloses(Range.lessThan(1)));
        assertFalse(rangeSet.encloses(Range.closedOpen(1, 5)));
    
        assertTrue(rangeSet.contains(3));
        assertTrue(rangeSet.contains(0));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 02 18:21:29 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/TreeRangeSetTest.java

        assertThat(rangeSet.asRanges()).isEmpty();
        assertThat(rangeSet.complement().asRanges()).containsExactly(Range.<Integer>all());
      }
    
      public void testFillHoleExactly() {
        TreeRangeSet<Integer> rangeSet = TreeRangeSet.create();
        rangeSet.add(Range.closedOpen(1, 3));
        rangeSet.add(Range.closedOpen(4, 6));
        rangeSet.add(Range.closedOpen(3, 4));
        testInvariants(rangeSet);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 24.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/AbstractRangeSetTest.java

        assertEquals(rangeSet.asRanges().isEmpty(), rangeSet.isEmpty());
        assertEquals(rangeSet.asDescendingSetOfRanges().isEmpty(), rangeSet.isEmpty());
        assertEquals(!rangeSet.asRanges().iterator().hasNext(), rangeSet.isEmpty());
        assertEquals(!rangeSet.asDescendingSetOfRanges().iterator().hasNext(), rangeSet.isEmpty());
    
        List<Range<C>> asRanges = ImmutableList.copyOf(rangeSet.asRanges());
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 20:09:59 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/AbstractRangeSet.java

      public abstract boolean encloses(Range<C> otherRange);
    
      @Override
      public boolean equals(@CheckForNull Object obj) {
        if (obj == this) {
          return true;
        } else if (obj instanceof RangeSet) {
          RangeSet<?> other = (RangeSet<?>) obj;
          return this.asRanges().equals(other.asRanges());
        }
        return false;
      }
    
      @Override
      public final int hashCode() {
        return asRanges().hashCode();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ImmutableRangeSet.java

      }
    
      /** Returns an immutable copy of the specified {@code RangeSet}. */
      public static <C extends Comparable> ImmutableRangeSet<C> copyOf(RangeSet<C> rangeSet) {
        checkNotNull(rangeSet);
        if (rangeSet.isEmpty()) {
          return of();
        } else if (rangeSet.encloses(Range.<C>all())) {
          return all();
        }
    
        if (rangeSet instanceof ImmutableRangeSet) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 27K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ImmutableRangeMap.java

        }
        RegularImmutableSortedSet<Range<K>> rangeSet =
            new RegularImmutableSortedSet<>(ranges, Range.<K>rangeLexOrdering());
        return new ImmutableSortedMap<>(rangeSet, values);
      }
    
      @Override
      public ImmutableMap<Range<K>, V> asDescendingMapOfRanges() {
        if (ranges.isEmpty()) {
          return ImmutableMap.of();
        }
        RegularImmutableSortedSet<Range<K>> rangeSet =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/BenchmarkHelpers.java

          @Override
          <K extends Comparable<K>> RangeSet<K> create(RangeSet<K> contents) {
            return TreeRangeSet.create(contents);
          }
        },
        ImmutableRangeSetImpl {
          @Override
          <K extends Comparable<K>> RangeSet<K> create(RangeSet<K> contents) {
            return ImmutableRangeSet.copyOf(contents);
          }
        };
    
        abstract <K extends Comparable<K>> RangeSet<K> create(RangeSet<K> contents);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/BenchmarkHelpers.java

          @Override
          <K extends Comparable<K>> RangeSet<K> create(RangeSet<K> contents) {
            return TreeRangeSet.create(contents);
          }
        },
        ImmutableRangeSetImpl {
          @Override
          <K extends Comparable<K>> RangeSet<K> create(RangeSet<K> contents) {
            return ImmutableRangeSet.copyOf(contents);
          }
        };
    
        abstract <K extends Comparable<K>> RangeSet<K> create(RangeSet<K> contents);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/RangeMap.java

    /**
     * A mapping from disjoint nonempty ranges to non-null values. Queries look up the value associated
     * with the range (if any) that contains a specified key.
     *
     * <p>In contrast to {@link RangeSet}, no "coalescing" is done of {@linkplain
     * Range#isConnected(Range) connected} ranges, even if they are mapped to the same value.
     *
     * @author Louis Wasserman
     * @since 14.0
     */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 6.5K bytes
    - Viewed (0)
Back to top