Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 294 for Enum (0.14 sec)

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

    /**
     * Tests for {@link Enums}.
     *
     * @author Steve McKay
     */
    @GwtIncompatible
    @J2ktIncompatible
    public class EnumsTest extends TestCase {
    
      private enum TestEnum {
        CHEETO,
        HONDA,
        POODLE,
      }
    
      private enum OtherEnum {}
    
      public void testGetIfPresent() {
        assertThat(Enums.getIfPresent(TestEnum.class, "CHEETO")).hasValue(TestEnum.CHEETO);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 8.8K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/hash/HashCodeBenchmark.java

      @Param({"1000", "100000"})
      private int size;
    
      @Param WhereToDiffer whereToDiffer;
    
      @Param EqualsImplementation equalsImpl;
    
      private enum WhereToDiffer {
        ONE_PERCENT_IN,
        LAST_BYTE,
        NOT_AT_ALL;
      }
    
      private enum EqualsImplementation {
        ANDING_BOOLEANS {
          @Override
          boolean doEquals(byte[] a, byte[] b) {
            if (a.length != b.length) {
              return false;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.9K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/hash/HashCodeBenchmark.java

      @Param({"1000", "100000"})
      private int size;
    
      @Param WhereToDiffer whereToDiffer;
    
      @Param EqualsImplementation equalsImpl;
    
      private enum WhereToDiffer {
        ONE_PERCENT_IN,
        LAST_BYTE,
        NOT_AT_ALL;
      }
    
      private enum EqualsImplementation {
        ANDING_BOOLEANS {
          @Override
          boolean doEquals(byte[] a, byte[] b) {
            if (a.length != b.length) {
              return false;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/hash/Funnel.java

     * serialization of funnels. When possible, it is recommended that funnels be implemented as a
     * single-element enum to maintain serialization guarantees. See Effective Java (2nd Edition), Item
     * 3: "Enforce the singleton property with a private constructor or an enum type". For example:
     *
     * <pre>{@code
     * public enum PersonFunnel implements Funnel<Person> {
     *   INSTANCE;
     *   public void funnel(Person person, PrimitiveSink into) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 2.2K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/collect/BinaryTreeTraverserBenchmark.java

        final Optional<BinaryNode> right;
    
        BinaryNode(int x, Optional<BinaryNode> left, Optional<BinaryNode> right) {
          this.x = x;
          this.left = left;
          this.right = right;
        }
      }
    
      enum Topology {
        BALANCED {
          @Override
          Optional<BinaryNode> createTree(int size, Random rng) {
            if (size == 0) {
              return Optional.absent();
            } else {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 26 19:18:53 GMT 2019
    - 4.9K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/AnEnum.java

    package com.google.common.collect.testing;
    
    import com.google.common.annotations.GwtCompatible;
    
    /**
     * A sample enumerated type we use for testing.
     *
     * @author Kevin Bourrillion
     */
    @GwtCompatible
    public enum AnEnum {
      A,
      B,
      C,
      D,
      E,
      F
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 21 02:27:51 GMT 2017
    - 854 bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/hash/HashFunctionEnum.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.hash;
    
    
    /**
     * An enum that contains all of the known hash functions.
     *
     * @author Kurt Alfred Kluever
     */
    enum HashFunctionEnum {
      ADLER32(Hashing.adler32()),
      CRC32(Hashing.crc32()),
      GOOD_FAST_HASH_32(Hashing.goodFastHash(32)),
      GOOD_FAST_HASH_64(Hashing.goodFastHash(64)),
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 1.7K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/base/Enums.java

       * {@code enumClass} using {@link Enum#valueOf(Class, String)} and {@link Enum#name()}. The
       * converter will throw an {@code IllegalArgumentException} if the argument is not the name of any
       * enum constant in the specified enum.
       *
       * @since 16.0
       */
      @GwtIncompatible
      public static <T extends Enum<T>> Converter<String, T> stringConverter(Class<T> enumClass) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 26 11:56:44 GMT 2023
    - 5K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/TestEnumSetGenerator.java

    import com.google.common.collect.testing.SampleElements.Enums;
    import java.util.Collections;
    import java.util.List;
    import java.util.Set;
    
    /**
     * An abstract TestSetGenerator for generating sets containing enum values.
     *
     * @author Kevin Bourrillion
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public abstract class TestEnumSetGenerator implements TestSetGenerator<AnEnum> {
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetFeature.java

    /**
     * Optional features of classes derived from {@link Multiset}.
     *
     * @author Louis Wasserman
     */
    @SuppressWarnings("rawtypes") // maybe avoidable if we rework the whole package?
    @GwtCompatible
    public enum MultisetFeature implements Feature<Multiset> {
      /**
       * Indicates that elements from {@code Multiset.entrySet()} update to reflect changes in the
       * backing multiset.
       */
      ENTRIES_ARE_VIEWS;
    
      @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 1.8K bytes
    - Viewed (0)
Back to top