Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for elements (0.21 sec)

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

         */
        @CanIgnoreReturnValue
        @Override
        public Builder<E> add(E element) {
          return addCopies(element, 1);
        }
    
        /**
         * Adds each element of {@code elements} to the {@code ImmutableSortedMultiset}.
         *
         * @param elements the elements to add
         * @return this {@code Builder} object
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 35.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Iterators.java

       * elements.
       */
      @SafeVarargs
      public static <T extends @Nullable Object> Iterator<T> cycle(T... elements) {
        return cycle(Lists.newArrayList(elements));
      }
    
      /**
       * Returns an Iterator that walks the specified array, nulling out elements behind it. This can
       * avoid memory leaks when an element is no longer necessary.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 18:43:01 GMT 2024
    - 51.1K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/Multisets.java

      /**
       * Returns the expected number of distinct elements given the specified elements. The number of
       * distinct elements is only computed if {@code elements} is an instance of {@code Multiset};
       * otherwise the default value of 11 is returned.
       */
      static int inferDistinctElements(Iterable<?> elements) {
        if (elements instanceof Multiset) {
          return ((Multiset<?>) elements).elementSet().size();
        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ImmutableSortedSet.java

        public Builder<E> add(E element) {
          super.add(element);
          return this;
        }
    
        /**
         * Adds each element of {@code elements} to the {@code ImmutableSortedSet}, ignoring duplicate
         * elements (only the first duplicate element is added).
         *
         * @param elements the elements to add
         * @return this {@code Builder} object
         * @throws NullPointerException if {@code elements} contains a null element
    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)
  5. android/guava/src/com/google/common/collect/Sets.java

      public static <E extends Enum<E>> ImmutableSet<E> immutableEnumSet(Iterable<E> elements) {
        if (elements instanceof ImmutableEnumSet) {
          return (ImmutableEnumSet<E>) elements;
        } else if (elements instanceof Collection) {
          Collection<E> collection = (Collection<E>) elements;
          if (collection.isEmpty()) {
            return ImmutableSet.of();
          } else {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 77.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ImmutableMultiset.java

         *
         * @param elements the elements to add
         * @return this {@code Builder} object
         * @throws NullPointerException if {@code elements} is null or contains a null element
         */
        @CanIgnoreReturnValue
        @Override
        public Builder<E> add(E... elements) {
          super.add(elements);
          return this;
        }
    
        /**
    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)
  7. android/guava/src/com/google/common/collect/ImmutableSet.java

            others.length <= Integer.MAX_VALUE - 6, "the total number of elements must fit in an int");
        final int paramCount = 6;
        Object[] elements = new Object[paramCount + others.length];
        elements[0] = e1;
        elements[1] = e2;
        elements[2] = e3;
        elements[3] = e4;
        elements[4] = e5;
        elements[5] = e6;
        System.arraycopy(others, 0, elements, paramCount, others.length);
    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)
  8. android/guava/src/com/google/common/collect/ImmutableList.java

        // We special-case for 0 or 1 elements, but going further is madness.
        if (!elements.hasNext()) {
          return of();
        }
        E first = elements.next();
        if (!elements.hasNext()) {
          return of(first);
        } else {
          return new ImmutableList.Builder<E>().add(first).addAll(elements).build();
        }
      }
    
      /**
       * Returns an immutable list containing the given elements, in order.
    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)
  9. android/guava/src/com/google/common/collect/MoreCollectors.java

      /**
       * A collector that converts a stream of zero or one elements to an {@code Optional}.
       *
       * @throws IllegalArgumentException if the stream consists of two or more elements.
       * @throws NullPointerException if any element in the stream is {@code null}.
       * @return {@code Optional.of(onlyElement)} if the stream has exactly one element (must not be
       *     {@code null}) and returns {@code Optional.empty()} if it has none.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Comparators.java

        return new LexicographicalOrdering<S>(checkNotNull(comparator));
      }
    
      /**
       * Returns {@code true} if each element in {@code iterable} after the first is greater than or
       * equal to the element that preceded it, according to the specified comparator. Note that this is
       * always true when the iterable has fewer than two elements.
       */
      public static <T extends @Nullable Object> boolean isInOrder(
    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)
Back to top