Search Options

Results per page
Sort
Preferred Languages
Advance

Results 421 - 430 of 450 for Singleton (1.4 sec)

  1. guava-tests/test/com/google/common/base/PredicatesTest.java

        assertEvalsToFalse(nasty);
    
        Predicate<? super Integer> stillNasty = SerializableTester.reserializeAndAssert(nasty);
    
        assertEvalsToFalse(stillNasty);
      }
    
      // enum singleton pattern
      private enum TrimStringFunction implements Function<String, String> {
        INSTANCE;
    
        @Override
        public String apply(String string) {
          return whitespace().trimFrom(string);
        }
      }
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 32.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/base/Optional.java

       * <p><b>Comparison to {@code java.util.Optional}:</b> this method is equivalent to Java 8's
       * {@code Optional.orElse(null)}.
       */
      public abstract @Nullable T orNull();
    
      /**
       * Returns an immutable singleton {@link Set} whose only element is the contained instance if it
       * is present; an empty immutable {@link Set} otherwise.
       *
       * <p><b>Comparison to {@code java.util.Optional}:</b> this method has no equivalent in Java 8's
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed Jun 04 13:03:16 UTC 2025
    - 15.4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableMultiset.java

        return CollectCollectors.toImmutableMultiset(elementFunction, countFunction);
      }
    
      /**
       * Returns the empty immutable multiset.
       *
       * <p><b>Performance note:</b> the instance returned is a singleton.
       */
      @SuppressWarnings("unchecked") // all supported methods are covariant
      public static <E> ImmutableMultiset<E> of() {
        return (ImmutableMultiset<E>) RegularImmutableMultiset.EMPTY;
      }
    
      /**
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 22 21:07:18 UTC 2025
    - 20.6K bytes
    - Viewed (0)
  4. compat/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java

     * specific language governing permissions and limitations
     * under the License.
     */
    package org.apache.maven.model.validation;
    
    import javax.inject.Inject;
    import javax.inject.Named;
    import javax.inject.Singleton;
    
    import java.io.File;
    import java.util.Arrays;
    import java.util.Deque;
    import java.util.HashMap;
    import java.util.HashSet;
    import java.util.Iterator;
    import java.util.LinkedList;
    import java.util.List;
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Wed Sep 03 15:06:05 UTC 2025
    - 66.8K bytes
    - Viewed (0)
  5. src/main/java/jcifs/audit/SecurityAuditLogger.java

            }
        }
    
        private static class SingletonHolder {
            private static final SecurityAuditLogger INSTANCE = new SecurityAuditLogger();
        }
    
        /**
         * Get the singleton instance
         *
         * @return SecurityAuditLogger instance
         */
        public static SecurityAuditLogger getInstance() {
            return SingletonHolder.INSTANCE;
        }
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 26.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ImmutableCollection.java

     *
     * <p>Expressing the immutability guarantee directly in the type that user code references is a
     * powerful advantage. Although Java offers certain immutable collection factory methods, such as
     * {@link Collections#singleton(Object)} and <a
     * href="https://docs.oracle.com/javase/9/docs/api/java/util/Set.html#immutable">{@code Set.of}</a>,
     * we recommend using <i>these</i> classes instead for this reason (as well as for consistency).
     *
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 21.4K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbFileIntegrationTest.java

                return result;
            } catch (Exception e) {
                log.warn("Failed to create fresh context, using singleton", e);
                try {
                    // Fallback to singleton with fresh auth
                    NtlmPasswordAuthentication auth =
                            new NtlmPasswordAuthentication(SingletonContext.getInstance(), WORKGROUP, USERNAME, PASSWORD);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 56K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/opensearch/user/bsentity/dbmeta/UserDbm.java

        // ===================================================================================
        //                                                                           Singleton
        //                                                                           =========
        private static final UserDbm _instance = new UserDbm();
    
        private UserDbm() {
        }
    
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Sat Mar 15 06:53:53 UTC 2025
    - 27K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/OkHttpClient.kt

     *
     * Use `new OkHttpClient()` to create a shared instance with the default settings:
     *
     * ```java
     * // The singleton HTTP client.
     * public final OkHttpClient client = new OkHttpClient();
     * ```
     *
     * Or use `new OkHttpClient.Builder()` to create a shared instance with custom settings:
     *
     * ```java
     * // The singleton HTTP client.
     * public final OkHttpClient client = new OkHttpClient.Builder()
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 21:55:03 UTC 2025
    - 51.4K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/Iterators.java

      @SuppressWarnings("unchecked")
      static <T extends @Nullable Object> UnmodifiableListIterator<T> emptyListIterator() {
        return (UnmodifiableListIterator<T>) ArrayItr.EMPTY;
      }
    
      /**
       * This is an enum singleton rather than an anonymous class so ProGuard can figure out it's only
       * referenced by emptyModifiableIterator().
       */
      private enum EmptyModifiableIterator implements Iterator<Object> {
        INSTANCE;
    
        @Override
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 16 12:42:11 UTC 2025
    - 51.4K bytes
    - Viewed (0)
Back to top