Class By<Left,​Right>

  • All Implemented Interfaces:
    BiFunction<Left,​Right,​java.lang.Integer>, FragileBiFunction<Left,​Right,​java.lang.Integer,​java.lang.RuntimeException>

    public final class By<Left,​Right>
    extends DelegatingBiFunction<Left,​Right,​java.lang.Integer>
    A BiFunction which compares two instances of different types by mapping them onto a common type and using a Comparator to compare those results.

    This is particularly useful with Diff.

    See Also:
    By
    • Constructor Summary

      Constructors 
      Constructor Description
      By​(Function<? super Left,​? extends V> leftMappingFunction, Function<? super Right,​? extends V> rightMappingFunction)  
      By​(Function<? super Left,​? extends V> leftMappingFunction, Function<? super Right,​? extends V> rightMappingFunction, java.util.Comparator<? super V> delegate)  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • By

        public By​(Function<? super Left,​? extends V> leftMappingFunction,
                  Function<? super Right,​? extends V> rightMappingFunction)
      • By

        public By​(Function<? super Left,​? extends V> leftMappingFunction,
                  Function<? super Right,​? extends V> rightMappingFunction,
                  java.util.Comparator<? super V> delegate)