Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for anEnum (0.05 sec)

  1. android/guava-testlib/src/com/google/common/collect/testing/TestEnumMapGenerator.java

    public abstract class TestEnumMapGenerator implements TestMapGenerator<AnEnum, String> {
    
      @Override
      public SampleElements<Entry<AnEnum, String>> samples() {
        return new SampleElements<>(
            mapEntry(AnEnum.A, "January"),
            mapEntry(AnEnum.B, "February"),
            mapEntry(AnEnum.C, "March"),
            mapEntry(AnEnum.D, "April"),
            mapEntry(AnEnum.E, "May"));
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/TestEnumSetGenerator.java

    public abstract class TestEnumSetGenerator implements TestSetGenerator<AnEnum> {
      @Override
      public SampleElements<AnEnum> samples() {
        return new Enums();
      }
    
      @Override
      public Set<AnEnum> create(Object... elements) {
        AnEnum[] array = new AnEnum[elements.length];
        int i = 0;
        for (Object e : elements) {
          array[i++] = (AnEnum) e;
        }
        return create(array);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/ImmutableEnumMapTest.java

        return suite;
      }
    
      public void testIteratesOnce() {
        Map<AnEnum, AnEnum> map =
            Maps.asMap(
                ImmutableSet.of(AnEnum.A),
                new Function<AnEnum, AnEnum>() {
                  boolean used = false;
    
                  @Override
                  public AnEnum apply(AnEnum ae) {
                    checkState(!used, "should not be applied more than once");
                    used = true;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/google/TestEnumMultisetGenerator.java

    public abstract class TestEnumMultisetGenerator implements TestMultisetGenerator<AnEnum> {
      @Override
      public SampleElements<AnEnum> samples() {
        return new Enums();
      }
    
      @Override
      public Multiset<AnEnum> create(Object... elements) {
        AnEnum[] array = new AnEnum[elements.length];
        int i = 0;
        for (Object e : elements) {
          array[i++] = (AnEnum) e;
        }
        return create(array);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/TestEnumSetGenerator.java

    public abstract class TestEnumSetGenerator implements TestSetGenerator<AnEnum> {
      @Override
      public SampleElements<AnEnum> samples() {
        return new Enums();
      }
    
      @Override
      public Set<AnEnum> create(Object... elements) {
        AnEnum[] array = new AnEnum[elements.length];
        int i = 0;
        for (Object e : elements) {
          array[i++] = (AnEnum) e;
        }
        return create(array);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/SampleElements.java

          super('b', 'a', 'c', 'd', 'e');
        }
      }
    
      public static class Enums extends SampleElements<AnEnum> {
        public Enums() {
          // elements aren't sorted, to better test SortedSet iteration ordering
          super(AnEnum.B, AnEnum.A, AnEnum.C, AnEnum.D, AnEnum.E);
        }
      }
    
      public static class Ints extends SampleElements<Integer> {
        public Ints() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/google/MapGenerators.java

        @Override
        protected Map<AnEnum, String> create(Entry<AnEnum, String>[] entries) {
          EnumMap<AnEnum, String> map = new EnumMap<>(AnEnum.class);
          for (Entry<AnEnum, String> entry : entries) {
            map.put(entry.getKey(), entry.getValue());
          }
          return ImmutableMap.copyOf(map);
        }
    
        @Override
        public Iterable<Entry<AnEnum, String>> order(List<Entry<AnEnum, String>> insertionOrder) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/TestsForSetsInJavaUtil.java

      public Test testsForEnumSet() {
        return SetTestSuiteBuilder.using(
                new TestEnumSetGenerator() {
                  @Override
                  public Set<AnEnum> create(AnEnum[] elements) {
                    return (elements.length == 0)
                        ? EnumSet.noneOf(AnEnum.class)
                        : EnumSet.copyOf(MinimalCollection.of(elements));
                  }
                })
            .named("EnumSet")
            .withFeatures(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 15K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/SampleElements.java

          super('b', 'a', 'c', 'd', 'e');
        }
      }
    
      public static class Enums extends SampleElements<AnEnum> {
        public Enums() {
          // elements aren't sorted, to better test SortedSet iteration ordering
          super(AnEnum.B, AnEnum.A, AnEnum.C, AnEnum.D, AnEnum.E);
        }
      }
    
      public static class Ints extends SampleElements<Integer> {
        public Ints() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/EnumMultisetTest.java

      }
    
      private static TestEnumMultisetGenerator enumMultisetGenerator() {
        return new TestEnumMultisetGenerator() {
          @Override
          protected Multiset<AnEnum> create(AnEnum[] elements) {
            return (elements.length == 0)
                ? EnumMultiset.create(AnEnum.class)
                : EnumMultiset.create(asList(elements));
          }
        };
      }
    
      private enum Color {
        BLUE,
        RED,
        YELLOW,
        GREEN,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.9K bytes
    - Viewed (0)
Back to top