Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for asImmutableList (0.25 sec)

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

       */
      static <E> ImmutableList<E> asImmutableList(Object[] elements) {
        return asImmutableList(elements, elements.length);
      }
    
      /**
       * Views the array as an immutable list. Copies if the specified range does not cover the complete
       * array. Does not check for nulls.
       */
      static <E> ImmutableList<E> asImmutableList(@Nullable Object[] elements, int length) {
        switch (length) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 30K bytes
    - Viewed (1)
  2. android/guava/src/com/google/common/collect/ImmutableList.java

       *
       * <p>The array must be internally created.
       */
      static <E> ImmutableList<E> asImmutableList(Object[] elements) {
        return asImmutableList(elements, elements.length);
      }
    
      /** Views the array as an immutable list. Does not check for nulls. */
      static <E> ImmutableList<E> asImmutableList(@Nullable Object[] elements, int length) {
        if (length == 0) {
          return of();
        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 27.1K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/RegularImmutableSet.java

        System.arraycopy(elements, 0, dst, offset, size);
        return offset + size;
      }
    
      @Override
      ImmutableList<E> createAsList() {
        return ImmutableList.asImmutableList(elements, size);
      }
    
      @Override
      boolean isPartialView() {
        return false;
      }
    
      @Override
      public int hashCode() {
        return hashCode;
      }
    
      @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableList.java

       *
       * <p>The array must be internally created.
       */
      @SuppressWarnings("unchecked") // caller is reponsible for getting this right
      static <E> ImmutableList<E> asImmutableList(Object[] elements) {
        return unsafeDelegateList((List) Arrays.asList(elements));
      }
    
      public static <E extends Comparable<? super E>> ImmutableList<E> sortedCopyOf(
          Iterable<? extends E> elements) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 27 19:19:19 GMT 2024
    - 11K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

                prevKey = key;
              }
            }
            return new ImmutableSortedMap<>(
                new RegularImmutableSortedSet<K>(ImmutableList.<K>asImmutableList(keys), comparator),
                ImmutableList.<V>asImmutableList(values));
        }
      }
    
      /**
       * Returns a builder that creates immutable sorted maps whose keys are ordered by their natural
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 53.2K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ImmutableSortedSet.java

          if (comparator.compare(cur, prev) != 0) {
            contents[uniques++] = cur;
          }
        }
        Arrays.fill(contents, uniques, n, null);
        return new RegularImmutableSortedSet<>(
            ImmutableList.<E>asImmutableList(contents, uniques), comparator);
      }
    
      /**
       * Returns a builder that creates immutable sorted sets with an explicit comparator. If the
    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)
  7. android/guava/src/com/google/common/collect/ImmutableCollection.java

       * subject to change.
       *
       * @since 2.0
       */
      public ImmutableList<E> asList() {
        return isEmpty() ? ImmutableList.of() : ImmutableList.asImmutableList(toArray());
      }
    
      /**
       * Returns {@code true} if this immutable collection's implementation contains references to
       * user-created objects that aren't accessible via this collection's methods. This is generally
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 21.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ImmutableSet.java

      public ImmutableList<E> asList() {
        ImmutableList<E> result = asList;
        return (result == null) ? asList = createAsList() : result;
      }
    
      ImmutableList<E> createAsList() {
        return ImmutableList.asImmutableList(toArray());
      }
    
      /*
       * This class is used to serialize all ImmutableSet instances, except for
       * ImmutableEnumSet/ImmutableSortedSet, regardless of implementation type. It
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/ImmutableSet.java

               * populated.
               */
              return of(requireNonNull(dedupedElements[0]));
            default:
              return new JdkBackedImmutableSet<>(
                  delegate, ImmutableList.asImmutableList(dedupedElements, distinct));
          }
        }
      }
    
      private static int estimatedSizeForUnknownDuplication(int inputElementsIncludingAnyDuplicates) {
        if (inputElementsIncludingAnyDuplicates
    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)
  10. android/guava/src/com/google/common/collect/ImmutableSortedSet.java

          // large array relative to the number of elements, so we cap the ratio.
          contents = Arrays.copyOf(contents, uniques);
        }
        return new RegularImmutableSortedSet<E>(
            ImmutableList.<E>asImmutableList(contents, uniques), comparator);
      }
    
      /**
       * Returns a builder that creates immutable sorted sets with an explicit comparator. If the
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
Back to top