Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for copyIfNecessary (0.08 seconds)

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

        }
    
        @VisibleForTesting
        void forceJdk() {
          requireNonNull(impl); // see the comment on the field
          this.impl = new JdkBackedSetBuilderImpl<>(impl);
        }
    
        final void copyIfNecessary() {
          if (forceCopy) {
            copy();
            forceCopy = false;
          }
        }
    
        void copy() {
          requireNonNull(impl); // see the comment on the field
          impl = impl.copy();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Nov 07 16:09:47 GMT 2025
    - 35.3K bytes
    - Click Count (0)
  2. guava/src/com/google/common/collect/ImmutableSortedSet.java

         * @throws NullPointerException if {@code element} is null
         */
        @CanIgnoreReturnValue
        @Override
        public Builder<E> add(E element) {
          checkNotNull(element);
          copyIfNecessary();
          if (n == elements.length) {
            sortAndDedup();
            /*
             * sortAndDedup may have made enough room for this element, but that's not necessarily good
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Sep 23 17:50:58 GMT 2025
    - 39.1K bytes
    - Click Count (0)
Back to Top