Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for caster (0.19 sec)

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

       * @throws NullPointerException if {@code elements} contains a null element
       * @since 3.0
       */
      public static <E> ImmutableList<E> copyOf(E[] elements) {
        switch (elements.length) {
          case 0:
            return of();
          case 1:
            return of(elements[0]);
          default:
            return construct(elements.clone());
        }
      }
    
      /**
    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. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableList.java

      }
    
      private static <E> ImmutableList<E> copyFromCollection(Collection<? extends E> collection) {
        Object[] elements = collection.toArray();
        switch (elements.length) {
          case 0:
            return of();
          case 1:
            @SuppressWarnings("unchecked") // safe because it came from `collection`
            E element = (E) elements[0];
            return of(element);
          default:
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 27 19:19:19 GMT 2024
    - 11K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/ImmutableList.java

      @Deprecated
      @Override
      public final ImmutableList<E> asList() {
        return this;
      }
    
      @Override
      int copyIntoArray(@Nullable Object[] dst, int offset) {
        // this loop is faster for RandomAccess instances, which ImmutableLists are
        int size = size();
        for (int i = 0; i < size; i++) {
          dst[offset + i] = get(i);
        }
        return offset + size;
      }
    
      /**
    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)
Back to top