Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 63 for ImmutableCollection (0.43 sec)

  1. android/guava-testlib/test/com/google/common/testing/FreshValueGeneratorTest.java

        assertNotInstantiable(new TypeToken<ImmutableMultiset<EmptyEnum>>() {});
      }
    
      public void testImmutableCollection() {
        assertFreshInstance(new TypeToken<ImmutableCollection<String>>() {});
        assertNotInstantiable(new TypeToken<ImmutableCollection<EmptyEnum>>() {});
      }
    
      public void testImmutableMap() {
        assertFreshInstance(new TypeToken<ImmutableMap<String, Integer>>() {});
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 17.2K bytes
    - Viewed (0)
  2. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableList.java

        if (elements instanceof ImmutableCollection) {
          /*
           * TODO: When given an ImmutableList that's a sublist, copy the referenced
           * portion of the array into a new array to save space?
           */
          @SuppressWarnings("unchecked") // all supported methods are covariant
          ImmutableCollection<E> list = (ImmutableCollection<E>) elements;
          return list.asList();
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 14 22:14:46 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableList.java

            Collection<?> collection = (Collection<?>) elements;
            ensureRoomFor(collection.size());
            if (collection instanceof ImmutableCollection) {
              ImmutableCollection<?> immutableCollection = (ImmutableCollection<?>) collection;
              size = immutableCollection.copyIntoArray(contents, size);
              return this;
            }
          }
          super.addAll(elements);
          return this;
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Aug 16 19:14:45 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ForwardingImmutableMap.java

              }
            });
      }
    
      @Override
      ImmutableSet<K> createKeySet() {
        return ImmutableSet.unsafeDelegate(delegate.keySet());
      }
    
      @Override
      ImmutableCollection<V> createValues() {
        return ImmutableCollection.unsafeDelegate(delegate.values());
      }
    
      @Override
      public int size() {
        return delegate.size();
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jan 24 16:03:45 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/ImmutableMapValues.java

     *
     * @author Jesse Wilson
     * @author Kevin Bourrillion
     */
    @GwtCompatible(emulated = true)
    @ElementTypesAreNonnullByDefault
    final class ImmutableMapValues<K, V> extends ImmutableCollection<V> {
      private final ImmutableMap<K, V> map;
    
      ImmutableMapValues(ImmutableMap<K, V> map) {
        this.map = map;
      }
    
      @Override
      public int size() {
        return map.size();
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ImmutableMap.java

          }
        };
      }
    
      @LazyInit @RetainedWith @CheckForNull private transient ImmutableCollection<V> values;
    
      /**
       * Returns an immutable collection of the values in this map, in the same order that they appear
       * in {@link #entrySet}.
       */
      @Override
      public ImmutableCollection<V> values() {
        ImmutableCollection<V> result = values;
        return (result == null) ? values = createValues() : result;
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ImmutableTable.java

      final UnmodifiableIterator<Cell<R, C, V>> cellIterator() {
        throw new AssertionError("should never be called");
      }
    
      @Override
      public ImmutableCollection<V> values() {
        return (ImmutableCollection<V>) super.values();
      }
    
      @Override
      abstract ImmutableCollection<V> createValues();
    
      @Override
      final Iterator<V> valuesIterator() {
        throw new AssertionError("should never be called");
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ImmutableList.java

       */
      public static <E> ImmutableList<E> copyOf(Collection<? extends E> elements) {
        if (elements instanceof ImmutableCollection) {
          @SuppressWarnings("unchecked") // all supported methods are covariant
          ImmutableList<E> list = ((ImmutableCollection<E>) elements).asList();
          return list.isPartialView() ? ImmutableList.<E>asImmutableList(list.toArray()) : list;
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 27.7K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/JdkBackedImmutableMap.java

        entries.forEach(e -> action.accept(e.getKey(), e.getValue()));
      }
    
      @Override
      ImmutableSet<K> createKeySet() {
        return new ImmutableMapKeySet<>(this);
      }
    
      @Override
      ImmutableCollection<V> createValues() {
        return new ImmutableMapValues<>(this);
      }
    
      @Override
      boolean isPartialView() {
        return false;
      }
    
      // redeclare to help optimizers with b/310253115
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  10. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ForwardingImmutableCollection.java

     * delegation to save code size.
     *
     * @author Hayward Chan
     */
    // TODO: Make this class GWT serializable.
    @ElementTypesAreNonnullByDefault
    class ForwardingImmutableCollection<E> extends ImmutableCollection<E> {
    
      final transient Collection<E> delegate;
    
      ForwardingImmutableCollection(Collection<E> delegate) {
        this.delegate = delegate;
      }
    
      @Override
      public UnmodifiableIterator<E> iterator() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jan 23 18:43:40 UTC 2024
    - 1.9K bytes
    - Viewed (0)
Back to top