Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for unsafeCompare (0.2 sec)

  1. android/guava/src/com/google/common/collect/ForwardingSortedMap.java

          super(ForwardingSortedMap.this);
        }
      }
    
      // unsafe, but worst case is a CCE or NPE is thrown, which callers will be expecting
      @SuppressWarnings({"unchecked", "nullness"})
      static int unsafeCompare(
          @Nullable Comparator<?> comparator, @Nullable Object o1, @Nullable Object o2) {
        if (comparator == null) {
          return ((Comparable<@Nullable Object>) o1).compareTo(o2);
        } else {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed Feb 12 16:28:01 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/ForwardingSortedSet.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import static com.google.common.collect.ForwardingSortedMap.unsafeCompare;
    
    import com.google.common.annotations.GwtCompatible;
    import java.util.Comparator;
    import java.util.Iterator;
    import java.util.NoSuchElementException;
    import java.util.SortedSet;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed Feb 12 16:28:01 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/RegularContiguousSet.java

        return intersectionInCurrentDomain(Range.upTo(toElement, BoundType.forBoolean(inclusive)));
      }
    
      @Override
      @SuppressWarnings("unchecked") // TODO(cpovirk): Use a shared unsafeCompare method.
      ContiguousSet<C> subSetImpl(
          C fromElement, boolean fromInclusive, C toElement, boolean toInclusive) {
        if (fromElement.compareTo(toElement) == 0 && !fromInclusive && !toInclusive) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 8.3K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/RegularImmutableSortedSet.java

        if (!thisIterator.hasNext()) {
          return false;
        }
    
        Object target = thatIterator.next();
        E current = thisIterator.next();
        try {
          while (true) {
            int cmp = unsafeCompare(current, target);
    
            if (cmp < 0) {
              if (!thisIterator.hasNext()) {
                return false;
              }
              current = thisIterator.next();
            } else if (cmp == 0) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 22 21:07:18 UTC 2025
    - 9K bytes
    - Viewed (0)
Back to top