Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for Blog (0.13 sec)

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

       * // returns {"foo", "quux"}
       * }</pre>
       *
       * <p>This {@code Collector} uses O(k) memory and takes expected time O(n) (worst-case O(n log
       * k)), as opposed to e.g. {@code Stream.sorted(comparator).limit(k)}, which currently takes O(n
       * log n) time and O(n) space.
       *
       * @throws IllegalArgumentException if {@code k < 0}
       * @since 33.2.0 (available since 22.0 in guava-jre)
       */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/TopKSelector.java

     * offering expected O(n + k log k) performance (worst case O(n log k)) for n calls to {@link
     * #offer} and a call to {@link #topK}, with O(k) memory. In comparison, quickselect has the same
     * asymptotics but requires O(n) memory, and a {@code PriorityQueue} implementation takes O(n log
     * k). In benchmarks, this implementation performs at least as well as either implementation, and
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableSet.java

         *
         * <p>If this returns false, then no query can take more than O(log n).
         *
         * <p>Note that for a RegularImmutableSet with elements with truly random hash codes, contains
         * operations take expected O(1) time but with high probability take O(log n) for at least some
         * element. (https://en.wikipedia.org/wiki/Linear_probing#Analysis)
         *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 35.4K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

                  "DelayedShutdownHook-for-" + service,
                  new Runnable() {
                    @Override
                    public void run() {
                      try {
                        // We'd like to log progress and failures that may arise in the
                        // following code, but unfortunately the behavior of logging
                        // is undefined in shutdown hooks.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 41.8K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/ImmutableSortedSet.java

          copyIfNecessary();
          if (n == elements.length) {
            sortAndDedup();
            /*
             * Sorting operations can only be allowed to occur once every O(n) operations to keep
             * amortized O(n log n) performance.  Therefore, ensure there are at least O(n) *unused*
             * spaces in the builder array.
             */
            int newLength = ImmutableCollection.Builder.expandedCapacity(n, n + 1);
    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)
  6. android/guava-tests/test/com/google/common/reflect/ClassPathTest.java

    import java.util.zip.ZipEntry;
    import junit.framework.TestCase;
    import org.junit.Test;
    
    /** Functional tests of {@link ClassPath}. */
    public class ClassPathTest extends TestCase {
      private static final Logger log = Logger.getLogger(ClassPathTest.class.getName());
      private static final File FILE = new File(".");
    
      public void testEquals() {
        new EqualsTester()
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 26 14:02:27 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/hash/BloomFilter.java

       */
      @VisibleForTesting
      static long optimalNumOfBits(long n, double p) {
        if (p == 0) {
          p = Double.MIN_VALUE;
        }
        return (long) (-n * Math.log(p) / (Math.log(2) * Math.log(2)));
      }
    
      private Object writeReplace() {
        return new SerialForm<T>(this);
      }
    
      private void readObject(ObjectInputStream stream) throws InvalidObjectException {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/Closer.java

        static final LoggingSuppressor INSTANCE = new LoggingSuppressor();
    
        @Override
        public void suppress(Closeable closeable, Throwable thrown, Throwable suppressed) {
          // log to the same place as Closeables
          Closeables.logger.log(
              Level.WARNING, "Suppressing exception thrown when closing " + closeable, suppressed);
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

          return constructor.newInstance();
        } catch (InstantiationException | IllegalAccessException impossible) {
          throw new AssertionError(impossible);
        } catch (InvocationTargetException e) {
          logger.log(Level.WARNING, "Exception while invoking default constructor.", e.getCause());
          return arbitraryConstantInstanceOrNull(type);
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 21K bytes
    - Viewed (1)
  10. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

          return constructor.newInstance();
        } catch (InstantiationException | IllegalAccessException impossible) {
          throw new AssertionError(impossible);
        } catch (InvocationTargetException e) {
          logger.log(Level.WARNING, "Exception while invoking default constructor.", e.getCause());
          return arbitraryConstantInstanceOrNull(type);
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 20.5K bytes
    - Viewed (0)
Back to top