Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for IncomparableValueException (0.52 sec)

  1. android/guava/src/com/google/common/collect/ExplicitOrdering.java

        return rank(left) - rank(right); // safe because both are nonnegative
      }
    
      private int rank(T value) {
        Integer rank = rankMap.get(value);
        if (rank == null) {
          throw new IncomparableValueException(value);
        }
        return rank;
      }
    
      @Override
      public boolean equals(@CheckForNull Object object) {
        if (object instanceof ExplicitOrdering) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sun Jun 20 14:22:42 GMT 2021
    - 2K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/ExplicitOrdering.java

        return rank(left) - rank(right); // safe because both are nonnegative
      }
    
      private int rank(T value) {
        Integer rank = rankMap.get(value);
        if (rank == null) {
          throw new IncomparableValueException(value);
        }
        return rank;
      }
    
      @Override
      public boolean equals(@CheckForNull Object object) {
        if (object instanceof ExplicitOrdering) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Sun Jun 20 14:22:42 GMT 2021
    - 2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/OrderingTest.java

          fail();
        } catch (IncomparableValueException expected) {
          assertEquals(0, expected.value);
        }
        reserializeAndAssert(c);
      }
    
      public void testExplicit_one() {
        Comparator<Integer> c = Ordering.explicit(0);
        assertEquals(0, c.compare(0, 0));
        try {
          c.compare(0, 1);
          fail();
        } catch (IncomparableValueException expected) {
          assertEquals(1, expected.value);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 42.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/OrderingTest.java

          fail();
        } catch (IncomparableValueException expected) {
          assertEquals(0, expected.value);
        }
        reserializeAndAssert(c);
      }
    
      public void testExplicit_one() {
        Comparator<Integer> c = Ordering.explicit(0);
        assertEquals(0, c.compare(0, 0));
        try {
          c.compare(0, 1);
          fail();
        } catch (IncomparableValueException expected) {
          assertEquals(1, expected.value);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 42.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Ordering.java

       * Extending {@link ClassCastException} may seem odd, but it is required.
       */
      @VisibleForTesting
      static class IncomparableValueException extends ClassCastException {
        final Object value;
    
        IncomparableValueException(Object value) {
          super("Cannot compare value: " + value);
          this.value = value;
        }
    
        private static final long serialVersionUID = 0;
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
Back to top