Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 180 for qcast (0.03 sec)

  1. guava/src/com/google/common/primitives/UnsignedInts.java

       * value}.
       *
       * @param value any {@code long} value
       * @return {@code 2^32 - 1} if {@code value >= 2^32}, {@code 0} if {@code value <= 0}, and {@code
       *     value} cast to {@code int} otherwise
       * @since 21.0
       */
      public static int saturatedCast(long value) {
        if (value <= 0) {
          return 0;
        } else if (value >= (1L << 32)) {
          return -1;
        } else {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 21:17:54 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  2. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedMap.java

      private static <K, V> ImmutableSortedMap<K, V> copyOfInternal(
          Map<? extends K, ? extends V> map, Comparator<? super K> comparator) {
    
        if (map instanceof ImmutableSortedMap) {
          // TODO: Prove that this cast is safe, even though
          // Collections.unmodifiableSortedMap requires the same key type.
          @SuppressWarnings("unchecked")
          ImmutableSortedMap<K, V> kvMap = (ImmutableSortedMap<K, V>) map;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 27 19:19:19 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableListMultimap.java

       * the provided key, an empty immutable list is returned. The values are in the same order as the
       * parameters used to build this multimap.
       */
      @Override
      public ImmutableList<V> get(K key) {
        // This cast is safe as its type is known in constructor.
        ImmutableList<V> list = (ImmutableList<V>) map.get(key);
        return (list == null) ? ImmutableList.<V>of() : list;
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Aug 16 20:20:32 UTC 2024
    - 19K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/primitives/CharsTest.java

        assertThat(Chars.saturatedCast(Long.MIN_VALUE)).isEqualTo(LEAST);
      }
    
      private void assertCastFails(long value) {
        try {
          Chars.checkedCast(value);
          fail("Cast to char should have failed: " + value);
        } catch (IllegalArgumentException ex) {
          assertWithMessage(value + " not found in exception text: " + ex.getMessage())
              .that(ex.getMessage().contains(String.valueOf(value)))
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 25.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/reflect/TypeResolver.java

        return Types.newParameterizedTypeWithOwner(
            resolvedOwner, (Class<?>) resolvedRawType, resolvedArgs);
      }
    
      private static <T> T expectArgument(Class<T> type, Object arg) {
        try {
          return type.cast(arg);
        } catch (ClassCastException e) {
          throw new IllegalArgumentException(arg + " is not a " + type.getSimpleName());
        }
      }
    
      /** A TypeTable maintains mapping from {@link TypeVariable} to types. */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 10 19:45:10 UTC 2022
    - 24.2K bytes
    - Viewed (0)
  6. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

        monitor.enter();
        try {
          if (a.length < count) a = ObjectArrays.newArray(a, count);
    
          int k = 0;
          int i = takeIndex;
          while (k < count) {
            // This cast is not itself safe, but the following statement
            // will fail if the runtime type of items[i] is not assignable
            // to the runtime type of a[k++], which is all that the method
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Apr 19 19:24:36 UTC 2023
    - 22.5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Maps.java

      public static <K extends Enum<K>, V> ImmutableMap<K, V> immutableEnumMap(
          Map<K, ? extends V> map) {
        if (map instanceof ImmutableEnumMap) {
          @SuppressWarnings("unchecked") // safe covariant cast
          ImmutableEnumMap<K, V> result = (ImmutableEnumMap<K, V>) map;
          return result;
        }
        Iterator<? extends Entry<K, ? extends V>> entryItr = map.entrySet().iterator();
        if (!entryItr.hasNext()) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 161.6K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/Maps.java

      public static <K extends Enum<K>, V> ImmutableMap<K, V> immutableEnumMap(
          Map<K, ? extends V> map) {
        if (map instanceof ImmutableEnumMap) {
          @SuppressWarnings("unchecked") // safe covariant cast
          ImmutableEnumMap<K, V> result = (ImmutableEnumMap<K, V>) map;
          return result;
        }
        Iterator<? extends Entry<K, ? extends V>> entryItr = map.entrySet().iterator();
        if (!entryItr.hasNext()) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 167.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/cache/CacheBuilder.java

        if (expireAfterWriteNanos == 0 || expireAfterAccessNanos == 0) {
          return 0;
        }
        return (weigher == null) ? maximumSize : maximumWeight;
      }
    
      // Make a safe contravariant cast now so we don't have to do it over and over.
      @SuppressWarnings("unchecked")
      <K1 extends K, V1 extends V> Weigher<K1, V1> getWeigher() {
        return (Weigher<K1, V1>) MoreObjects.firstNonNull(weigher, OneWeigher.INSTANCE);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 52K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/es/log/allcommon/EsAbstractBehavior.java

        //                                                                              ======
        @Override
        protected int delegateSelectCountUniquely(final ConditionBean cb) {
            // #pending check response and cast problem
            final SearchRequestBuilder builder = client.prepareSearch(asEsIndex());
            final EsAbstractConditionBean esCb = (EsAbstractConditionBean) cb;
            if (esCb.getPreference() != null) {
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 26.4K bytes
    - Viewed (0)
Back to top