Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for usingToString (0.23 sec)

  1. guava-tests/test/com/google/common/collect/TreeBasedTableTest.java

                .comparator());
    
        sortedTable = TreeBasedTable.create(Collections.reverseOrder(), Ordering.usingToString());
        sortedTable.put("", 42, 'x');
        assertSame(Ordering.usingToString(), sortedTable.columnComparator());
        assertSame(
            Ordering.usingToString(),
            ((SortedMap<Integer, Character>) sortedTable.rowMap().values().iterator().next())
                .comparator());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 15K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/UsingToStringOrdering.java

      }
    
      // preserve singleton-ness, so equals() and hashCode() work correctly
      private Object readResolve() {
        return INSTANCE;
      }
    
      @Override
      public String toString() {
        return "Ordering.usingToString()";
      }
    
      private UsingToStringOrdering() {}
    
      private static final long serialVersionUID = 0;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sun Jun 20 14:22:42 UTC 2021
    - 1.4K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ComparisonChainTest.java

                    .compare(1L, 1L)
                    .compareFalseFirst(true, true)
                    .compare(1.0, 1.0)
                    .compare(1.0f, 1.0f)
                    .compare("a", "a", Ordering.usingToString())
                    .result())
            .isEqualTo(0);
      }
    
      public void testShortCircuitLess() {
        assertThat(
                ComparisonChain.start()
                    .compare("a", "b")
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 27 13:27:08 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/ImmutableSetMultimapTest.java

        assertThat(multimap.get("a")).containsExactly(10, 2).inOrder();
        assertEquals(
            Ordering.usingToString(), ((ImmutableSortedSet<Integer>) multimap.get("a")).comparator());
        assertEquals(
            Ordering.usingToString(), ((ImmutableSortedSet<Integer>) multimap.get("z")).comparator());
      }
    
      private ImmutableSetMultimap<String, Integer> createMultimap() {
        return ImmutableSetMultimap.<String, Integer>builder()
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 26.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/OrderingTest.java

        testComparator(arbitrary, list);
      }
    
      public void testUsingToString() {
        Ordering<Object> ordering = Ordering.usingToString();
        testComparator(ordering, 1, 12, 124, 2);
        assertEquals("Ordering.usingToString()", ordering.toString());
        assertSame(ordering, reserialize(ordering));
      }
    
      // use an enum to get easy serializability
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/OrderingTest.java

        testComparator(arbitrary, list);
      }
    
      public void testUsingToString() {
        Ordering<Object> ordering = Ordering.usingToString();
        testComparator(ordering, 1, 12, 124, 2);
        assertEquals("Ordering.usingToString()", ordering.toString());
        assertSame(ordering, reserialize(ordering));
      }
    
      // use an enum to get easy serializability
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Ordering.java

       * <p>The comparator is serializable.
       *
       * <p><b>Java 8+ users:</b> Use {@code Comparator.comparing(Object::toString)} instead.
       */
      @GwtCompatible(serializable = true)
      public static Ordering<Object> usingToString() {
        return UsingToStringOrdering.INSTANCE;
      }
    
      /**
       * Returns an arbitrary ordering over all objects, for which {@code compare(a, b) == 0} implies
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java

      private static final Ordering<Invokable<?, ?>> BY_PARAMETERS =
          new Ordering<Invokable<?, ?>>() {
            @Override
            public int compare(Invokable<?, ?> left, Invokable<?, ?> right) {
              return Ordering.usingToString().compare(left.getParameters(), right.getParameters());
            }
          };
    
      private static final Ordering<Invokable<?, ?>> BY_NUMBER_OF_PARAMETERS =
          new Ordering<Invokable<?, ?>>() {
            @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:18:12 UTC 2024
    - 32.7K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/Ordering.java

       * <p>The comparator is serializable.
       *
       * <p><b>Java 8+ users:</b> Use {@code Comparator.comparing(Object::toString)} instead.
       */
      @GwtCompatible(serializable = true)
      public static Ordering<Object> usingToString() {
        return UsingToStringOrdering.INSTANCE;
      }
    
      /**
       * Returns an arbitrary ordering over all objects, for which {@code compare(a, b) == 0} implies
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 39.4K bytes
    - Viewed (0)
Back to top