Search Options

Results per page
Sort
Preferred Languages
Advance

Results 131 - 140 of 180 for requireNonNull (0.09 sec)

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

        @Override
        public ImmutableBiMap<K, V> buildOrThrow() {
          switch (size) {
            case 0:
              return of();
            case 1:
              // requireNonNull is safe because the first `size` elements have been filled in.
              Entry<K, V> onlyEntry = requireNonNull(entries[0]);
              return of(onlyEntry.getKey(), onlyEntry.getValue());
            default:
              /*
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.6K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/CompactHashSet.java

       * CompactHashMap.
       */
    
      private Object requireTable() {
        return requireNonNull(table);
      }
    
      private int[] requireEntries() {
        return requireNonNull(entries);
      }
    
      private @Nullable Object[] requireElements() {
        return requireNonNull(elements);
      }
    
      @SuppressWarnings("unchecked")
      private E element(int i) {
        return (E) requireElements()[i];
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/AbstractService.java

          checkState(
              state == FAILED,
              "failureCause() is only valid if the service has failed, service is %s",
              state);
          // requireNonNull is safe because the constructor requires a non-null cause with state=FAILED.
          return requireNonNull(failure);
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 18:32:03 UTC 2023
    - 20.4K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/base/NullnessCasts.java

       * types (or if the type is a non-variable type, like {@code String}), then code should almost
       * never use this method, preferring instead to call {@code requireNonNull} so as to benefit from
       * its runtime check.
       *
       * <p>An example use case for this method is in implementing an {@code Iterator<T>} whose {@code
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 17 15:44:29 UTC 2021
    - 3.1K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/CompactLinkedHashMap.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import static java.util.Objects.requireNonNull;
    
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.annotations.VisibleForTesting;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ImmutableMap.java

           * entry objects that cannot be safely reused.
           */
          switch (size) {
            case 0:
              return of();
            case 1:
              // requireNonNull is safe because the first `size` elements have been filled in.
              Entry<K, V> onlyEntry = requireNonNull(entries[0]);
              return of(onlyEntry.getKey(), onlyEntry.getValue());
            default:
              break;
          }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 44.6K bytes
    - Viewed (0)
  7. impl/maven-core/src/main/java/org/apache/maven/execution/BuildSummary.java

         * @param wallTime The wall time of the project in milliseconds.
         */
        protected BuildSummary(MavenProject project, long execTime, long wallTime) {
            this.project = Objects.requireNonNull(project, "project cannot be null");
            // TODO Validate for < 0?
            this.execTime = execTime;
            this.wallTime = wallTime;
        }
    
        /**
         * Gets the project being summarized.
         *
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/util/MemoryUtil.java

            return byteCountToDisplaySize(BigInteger.valueOf(size));
        }
    
        private static String byteCountToDisplaySize(final BigInteger size) {
            Objects.requireNonNull(size, "size");
            final String displaySize;
    
            if (size.divide(ONE_EB_BI).compareTo(BigInteger.ZERO) > 0) {
                displaySize = new BigDecimal(size.divide(ONE_PB_BI)).divide(BigDecimal.valueOf(1000)) + "EB";
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  9. impl/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java

    import org.eclipse.aether.version.VersionRange;
    import org.eclipse.aether.version.VersionScheme;
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    
    import static java.util.Objects.requireNonNull;
    
    /**
     * @since 3.3.0
     */
    @Named
    @Singleton
    public class DefaultRepositorySystemSessionFactory implements RepositorySystemSessionFactory {
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/ImmutableListMultimap.java

          Object key = requireNonNull(stream.readObject());
          int valueCount = stream.readInt();
          if (valueCount <= 0) {
            throw new InvalidObjectException("Invalid value count " + valueCount);
          }
    
          ImmutableList.Builder<Object> valuesBuilder = ImmutableList.builder();
          for (int j = 0; j < valueCount; j++) {
            valuesBuilder.add(requireNonNull(stream.readObject()));
          }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Aug 16 20:20:32 UTC 2024
    - 19K bytes
    - Viewed (0)
Back to top