Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 145 for element (0.23 sec)

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

       * Creates a new {@code EnumMultiset} containing the specified elements.
       *
       * <p>This implementation is highly efficient when {@code elements} is itself a {@link Multiset}.
       *
       * @param elements the elements that the multiset should contain
       * @throws IllegalArgumentException if {@code elements} is empty
       */
      public static <E extends Enum<E>> EnumMultiset<E> create(Iterable<E> elements) {
        Iterator<E> iterator = elements.iterator();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Multisets.java

          return unfiltered.add(element, occurrences);
        }
    
        @Override
        public int remove(@CheckForNull Object element, int occurrences) {
          checkNonnegative(occurrences, "occurrences");
          if (occurrences == 0) {
            return count(element);
          } else {
            return contains(element) ? unfiltered.remove(element, occurrences) : 0;
          }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 41.6K bytes
    - Viewed (0)
  3. 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 Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 20.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java

        @Override
        public Builder<E> add(E... elements) {
          for (E element : elements) {
            add(element);
          }
          return this;
        }
    
        /**
         * Adds a number of occurrences of an element to this {@code ImmutableSortedMultiset}.
         *
         * @param element the element to add
         * @param occurrences the number of occurrences of the element to add. May be zero, in which
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 35.3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Iterators.java

        while (iterator.hasNext()) {
          T element = iterator.next();
          if (!predicate.apply(element)) {
            return false;
          }
        }
        return true;
      }
    
      /**
       * Returns the first element in {@code iterator} that satisfies the given predicate; use this
       * method only when such an element is known to exist. If no such element is found, the iterator
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sat Apr 20 03:33:06 GMT 2024
    - 50.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Iterables.java

          Iterable<? extends @Nullable Object> iterable, @CheckForNull Object element) {
        if (iterable instanceof Collection) {
          Collection<?> collection = (Collection<?>) iterable;
          return Collections2.safeContains(collection, element);
        }
        return Iterators.contains(iterable.iterator(), element);
      }
    
      /**
       * Removes, from an iterable, every element that belongs to the provided collection.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 42.8K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/ImmutableList.java

       * @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)
  8. android/guava/src/com/google/common/collect/RegularImmutableSortedSet.java

      public E floor(E element) {
        int index = headIndex(element, true) - 1;
        return (index == -1) ? null : elements.get(index);
      }
    
      @Override
      @CheckForNull
      public E ceiling(E element) {
        int index = tailIndex(element, true);
        return (index == size()) ? null : elements.get(index);
      }
    
      @Override
      @CheckForNull
      public E higher(E element) {
        int index = tailIndex(element, false);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/Collections2.java

        }
    
        @Override
        public boolean add(@ParametricNullness E element) {
          checkArgument(predicate.apply(element));
          return unfiltered.add(element);
        }
    
        @Override
        public boolean addAll(Collection<? extends E> collection) {
          for (E element : collection) {
            checkArgument(predicate.apply(element));
          }
          return unfiltered.addAll(collection);
        }
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  10. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 36.7K bytes
    - Viewed (0)
Back to top