Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for unsafeCompare (0.31 sec)

  1. 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(
          @CheckForNull Comparator<?> comparator, @CheckForNull Object o1, @CheckForNull Object o2) {
        if (comparator == null) {
          return ((Comparable<@Nullable Object>) o1).compareTo(o2);
        } else {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri May 12 15:26:39 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  2. 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(
          @CheckForNull Comparator<?> comparator, @CheckForNull Object o1, @CheckForNull Object o2) {
        if (comparator == null) {
          return ((Comparable<@Nullable Object>) o1).compareTo(o2);
        } else {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 15:26:39 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  3. android/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;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 15:26:39 GMT 2023
    - 5.7K bytes
    - Viewed (0)
  4. 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;
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri May 12 15:26:39 GMT 2023
    - 5.7K bytes
    - Viewed (0)
  5. 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) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  6. android/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) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/ImmutableSortedSet.java

            return new RegularImmutableSortedSet<>(
                ImmutableList.asImmutableList(elements, n), comparator);
          }
        }
      }
    
      int unsafeCompare(Object a, @CheckForNull Object b) {
        return unsafeCompare(comparator, a, b);
      }
    
      static int unsafeCompare(Comparator<?> comparator, Object a, @CheckForNull Object b) {
        // Pretend the comparator can compare anything. If it turns out it can't
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 38.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ImmutableSortedSet.java

          this.forceCopy = true;
          return result;
        }
      }
    
      int unsafeCompare(Object a, @CheckForNull Object b) {
        return unsafeCompare(comparator, a, b);
      }
    
      static int unsafeCompare(Comparator<?> comparator, Object a, @CheckForNull Object b) {
        // Pretend the comparator can compare anything. If it turns out it can't
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 36.7K bytes
    - Viewed (0)
Back to top