Class FileIOUtils.TransformingComparator

  • All Implemented Interfaces:
    java.util.Comparator<java.lang.String>
    Enclosing class:
    FileIOUtils

    public static class FileIOUtils.TransformingComparator
    extends java.lang.Object
    implements java.util.Comparator<java.lang.String>
    Decorates the given comparator and applies the function before delegating to the decorated comparator.
    • Constructor Summary

      Constructors 
      Constructor Description
      TransformingComparator​(java.util.Comparator delegate, Function<java.lang.String,​java.lang.String> func)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(java.lang.String s1, java.lang.String s2)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • TransformingComparator

        public TransformingComparator​(java.util.Comparator delegate,
                                      Function<java.lang.String,​java.lang.String> func)
    • Method Detail

      • compare

        public int compare​(java.lang.String s1,
                           java.lang.String s2)
        Specified by:
        compare in interface java.util.Comparator<java.lang.String>