Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 490 for from (0.15 sec)

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

        // TODO(jlevy): For optimal performance, use a binary search when
        // targets.size() < size() / log(size())
        // TODO(kevinb): see if we can share code with OrderedIterator after it
        // graduates from labs.
        if (targets instanceof Multiset) {
          targets = ((Multiset<?>) targets).elementSet();
        }
        if (!SortedIterables.hasSameComparator(comparator(), targets) || (targets.size() <= 1)) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/FluentIterableTest.java

      }
    
      public void testGet() {
        assertEquals("a", FluentIterable.from(Lists.newArrayList("a", "b", "c")).get(0));
        assertEquals("b", FluentIterable.from(Lists.newArrayList("a", "b", "c")).get(1));
        assertEquals("c", FluentIterable.from(Lists.newArrayList("a", "b", "c")).get(2));
      }
    
      public void testGet_outOfBounds() {
        try {
          FluentIterable.from(Lists.newArrayList("a", "b", "c")).get(-1);
          fail();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 06 17:32:08 GMT 2023
    - 30.6K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

    /*
     * Written by Doug Lea and Martin Buchholz with assistance from
     * members of JCP JSR-166 Expert Group and released to the public
     * domain, as explained at
     * http://creativecommons.org/publicdomain/zero/1.0/
     */
    
    /*
     * Source:
     * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/test/tck-jsr166e/AtomicDoubleArrayTest.java?revision=1.13
     * (Modified to adapt to guava coding conventions)
     */
    
    package com.google.common.util.concurrent;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 10K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/LinkedHashMultimap.java

         * We could consider "lying" and omitting @CheckNotNull from all these fields. Normally, I'm not
         * a fan of that: What if we someday implement (presumably to be enabled during tests only)
         * bytecode rewriting that checks for any null value that passes through an API with a
         * known-non-null type? But that particular problem might not arise here, since we're not
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/CompactLinkedHashSet.java

     * constant time operations. Expected in the hashtable sense (depends on the hash function doing a
     * good job of distributing the elements to the buckets to a distribution not far from uniform), and
     * amortized since some operations can trigger a hash table resize.
     *
     * <p>This implementation consumes significantly less memory than {@code java.util.LinkedHashSet} or
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Feb 05 21:38:59 GMT 2024
    - 9.7K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/base/OptionalTest.java

      }
    
      private static Optional<Integer> getSomeOptionalInt() {
        return Optional.of(1);
      }
    
      private static FluentIterable<? extends Number> getSomeNumbers() {
        return FluentIterable.from(ImmutableList.<Number>of());
      }
    
      /*
       * The following tests demonstrate the shortcomings of or() and test that the casting workaround
       * mentioned in the method Javadoc does in fact compile.
       */
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

    import java.util.regex.Pattern;
    import javax.annotation.CheckForNull;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Generates fresh instances of types that are different from each other (if possible).
     *
     * @author Ben Yu
     */
    @GwtIncompatible
    @J2ktIncompatible
    class FreshValueGenerator {
    
      private static final ImmutableMap<Class<?>, Method> GENERATORS;
    
      static {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 28K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ImmutableSetMultimap.java

        @Override
        public ImmutableSetMultimap<K, V> build() {
          Collection<Map.Entry<K, Collection<V>>> mapEntries = builderMap.entrySet();
          if (keyComparator != null) {
            mapEntries = Ordering.from(keyComparator).<K>onKeys().immutableSortedCopy(mapEntries);
          }
          return fromMapEntries(mapEntries, valueComparator);
        }
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/DiscreteDomain.java

      public abstract C previous(C value);
    
      /**
       * Returns a signed value indicating how many nested invocations of {@link #next} (if positive) or
       * {@link #previous} (if negative) are needed to reach {@code end} starting from {@code start}.
       * For example, if {@code end = next(next(next(start)))}, then {@code distance(start, end) == 3}
       * and {@code distance(end, start) == -3}. As well, {@code distance(a, a)} is always zero.
       *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/NavigableMapTestSuiteBuilder.java

          super(delegate, to, from);
        }
    
        @Override
        NavigableMap<K, V> createSubMap(SortedMap<K, V> sortedMap, K firstExclusive, K lastExclusive) {
          NavigableMap<K, V> map = (NavigableMap<K, V>) sortedMap;
          if (from == Bound.NO_BOUND && to == Bound.INCLUSIVE) {
            return map.headMap(lastInclusive, true);
          } else if (from == Bound.EXCLUSIVE && to == Bound.NO_BOUND) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 7K bytes
    - Viewed (0)
Back to top