1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
package Torello.Build.Helper;

import java.util.function.ToIntFunction;

import Torello.HTML.Tools.JavaDoc.*;
import Torello.Java.*;

/**
 * This class is used in the Build for the Java-HTML Project.
 * This utilizes the JavaDoc Upgrader's "Rearrange Summaries"
 * These are the Arrays which are passed to method: Upgrade.setSummaryRearrange
 * 
 * The last Field Declarations (at the very end of this file), place all of these
 * internal-private fields into a big-array.  The arrays at the very end of the file are
 * all that are needed to be passed to "Upgrade.setSummaryRearrange" in order to create
 * JavaDoc Pages whose "Method Summary" sections have neat little titles.
 * 
 * Each of the "Sorter Functions" is just a Java Lamda that receives one of the tree
 * possible classes: Method, Field, Constructor (as defined in Torello.HTML.Tools.JavaDoc)
 * The integers that these functions are returning are just the array-index of the section
 * into which a method or field should be placed by the sort.
 */
public class SummRearrange
{
    // ********************************************************************************************
    // Class Torello.HTML.Links
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] linksSections = 
    { "Resolve URL's", "Resolve HREF-Attribute URL's", "Resolve SRC-Attribute URL's" };

    private static int linksSorter(Method m)
    {
        if (m.name.equals("NON_URL_HREFS")) return 0;  // First!  It contains "HREF"
        if (m.name.contains("SRC"))         return 2;
        if (m.name.contains("HREF"))        return 1;

        return 0;
    }

    // ********************************************************************************************
    // Class Torello.HTML.TagNode
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] tagNodeSections =
    { "General Purpose", "Attribute Test", "Attribute Modify & Update", "Attribute Retrieve" };

    private static int tagNodeSorter(Method m)
    {
        if (m.name.equals("hasValue"))              return 3;
        if (m.name.equals("clone"))                 return 0;
        if (m.name.equals("getInstance"))           return 0;
        if (m.name.equals("generateElementString")) return 0;
        if (m.name.startsWith("isTag"))             return 0;
        if (m.name.startsWith("toString"))          return 0;
        if (m.returnType.equals("boolean"))         return 1; // These *must* come at the end, because
        if (m.returnType.equals("TagNode"))         return 2; // the names above "take precedence"

        // This is a little tricky, since the "Complete Java Package Name" is stored in
        // the field 'm.returnType' - but only for non-JavaHTML classes!
        if (StrCmpr.equalsXOR(
                m.returnType,
                "java.lang.String",
                "java.util.Properties",
                "java.util.stream.Stream<java.lang.String>"
            )) return 3;

        return 0;
    }

    // ********************************************************************************************
    // Class Torello.HTML.Attributes
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] attributesSections =
    {
        "Complete Vector", "Range-Limited: sPos &amp; ePos",
        "Ranged-Limited: DotPair", "Position-Array"
    };

    private static int attributesSorter(Method m)
    {
        if (m.hasParameterNamed("posArr"))  return 3;
        if (m.hasParameterNamed("dp"))      return 2;
        if (m.hasParameterNamed("sPos"))    return 1;

        return 0;
    }

    // ********************************************************************************************
    // Class Torello.HTML.HTMLPage and HTMLPageMWT
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] htmlPageSections =
    {
        "Standard Parse",                           "Standard Parse, w/ Debug Files",
        "Page Limited: Line-Number",                "Page Limited: Line-Number, w/ Debug Files",
        "Page Limited: Start &amp; End Substring",  "Page Limited: Start &amp; End String, w/ Debug Files"
    };

    private static int htmlPageSorter(Method m)
    {
        boolean b = m.hasParameterNamed("matchesFile");

        if (m.hasParameterNamed("startLineNum"))    return b ? 3 : 2;
        if (m.hasParameterNamed("startTag"))        return b ? 5 : 4;

        return b ? 1 : 0;
    }

    // ********************************************************************************************
    // Class Torello.Java.StrCmpr
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] strCmprSections =
    {
        "Equals",       "Equals, Range-Limited",
        "Contains",     "Contains, Range-Limited",
        "Starts-With",  "Starts-With, Range-Limited",
        "Ends-With",    "Ends-With, Range-Limited",
        "Internal, Protected Methods"
    };

    private static int strCmprSorter(Method m)
    {
        boolean b = m.hasParameterNamed("sPos");

        if (m.hasModifier("protected"))         return 8;
        if (m.name.startsWith("equals"))        return b ? 1 : 0;
        if (m.name.startsWith("contains"))      return b ? 3 : 2;
        if (m.name.startsWith("startsWith"))    return b ? 5 : 4;
        if (m.name.startsWith("endsWith"))      return b ? 7 : 6;

        return 8;
    }

    // ********************************************************************************************
    // Class Torello.Java.StrTokCmpr
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] strTokCmprSections =
    {
        "Contains",                             "Contains, Range-Limited",
        "Contains w/ Extra-Delimiter Test",     "Contains, Range-Limited w/ Extra-Delimiter Test",
        "Starts-With",                          "Starts-With, Range-Limited",
        "Starts-With w/ Extra-Delimiter Test",  "Starts-With, Range-Limited w/ Extra-Delimiter Test",
        "Ends-With",                            "Ends-With, Range-Limited",
        "Ends-With w/ Extra-Delimiter Test",    "Ends-With, Range-Limited w/ Extra-Delimiter Test",
        "Internal, Protected Methods"
    };

    private static int strTokCmprSorter(Method m)
    {
        boolean lim     = m.hasParameterNamed("sPos");
        boolean test    = m.hasParameterNamed("extraDelimiterTest");

        if (m.hasModifier("protected")) return 12;

        if (m.name.startsWith("contains"))      return lim ? (test ? 3  : 1) : (test ? 2  : 0);
        if (m.name.startsWith("startsWith"))    return lim ? (test ? 7  : 5) : (test ? 6  : 4);
        if (m.name.startsWith("endsWith"))      return lim ? (test ? 11 : 9) : (test ? 10 : 8);

        return 12;
    }

    // ********************************************************************************************
    // Class Torello.Java.StrIndexOf
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] strIndexOfSections =
    {
        "All",              "All, Range-Limited",
        "First",            "First, Range-Limited",
        "Last",             "Last, Range-Limited",
        "Nth",              "Nth, Range-Limited",
        "Nth-From-End",     "Nth-From-End, Range-Limited",
        "Left",
        "Nth-Left"
    };

    private static int strIndexOfSorter(Method m)
    {
        boolean lim = m.hasParameterNamed("sPos");

        if (m.name.startsWith("all"))           return lim ? 1 : 0;
        if (m.name.startsWith("first"))         return lim ? 2 : 3;
        if (m.name.startsWith("last"))          return lim ? 4 : 5;
        if (m.name.startsWith("nthFromEnd"))    return lim ? 8 : 9;
        if (m.name.startsWith("nthLeft"))       return 11;  // Order matters!  These lines *MUST* come
        if (m.name.startsWith("left"))          return 10;  // after the previous lines!
        if (m.name.startsWith("nth"))           return lim ? 6 : 7;

        System.out.print(m.toString());
        throw new UnreachableError();
    }

    // ********************************************************************************************
    // Class Torello.Java.StrTokIndexOf
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] strTokIndexOfSections =
    {
        "All",                                  "All, Range-Limited",
        "All w/ Extra-Delimiter Test",          "All, Range-Limited w/ Extra-Delimiter Test",
        "First",                                "First, Range-Limited",
        "First w/ Extra-Delimiter Test",        "First, Range-Limited w/ Extra-Delimiter Test",
        "Last",                                 "Last, Range-Limited",
        "Last w/ Extra-Delimiter Test",         "Last, Range-Limited w/ Extra-Delimiter Test",
        "Nth",                                  "Nth, Range-Limited",
        "Nth w/ Extra-Delimiter Test",          "Nth, Range-Limited w/ Extra-Delimiter Test",
        "Nth-From-End",                         "Nth-From-End, Range-Limited",
        "Nth-From-End w/ Extra-Delimiter Test", "Nth-From-End, Range-Limited w/ Extra-Delimiter Test",
        "Left",                                 "Left w/ Extra-Delimiter Test",
        "Nth-Left",                             "Nth-Left w/ Extra-Delimiter Test"
    };

    private static int strTokIndexOfSorter(Method m)
    {
        boolean lim     = m.hasParameterNamed("sPos");
        boolean test    = m.hasParameterNamed("extraDelimiterTest");

        // The order matters among these sorter-lines!  methods named "nth", "nthLeft" and
        // "nthFromEnd" all start with the sub-string "nth"
        if (m.name.startsWith("all"))           return lim ? (test ? 3  : 1)  : (test ? 2  : 0);
        if (m.name.startsWith("first"))         return lim ? (test ? 7  : 5)  : (test ? 6  : 4);
        if (m.name.startsWith("last"))          return lim ? (test ? 11 : 9)  : (test ? 10 : 8);
        if (m.name.startsWith("nthFromEnd"))    return lim ? (test ? 19 : 17) : (test ? 18 : 16);
        if (m.name.startsWith("nthLeft"))       return test ? 23 : 22;
        if (m.name.startsWith("left"))          return test ? 21 : 20;
        if (m.name.startsWith("nth"))           return lim ? (test ? 15 : 13) : (test ? 14 : 12);

        System.out.print(m.toString());
        throw new UnreachableError();
    }

    // ********************************************************************************************
    // Class Torello.Java.StrCSV
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] strCSVSections =
    {
        "Parse CSV",
        "Generate CSV",                     "Generate CSV, Range-Limited",
        "Generate CSV, Primitive-Array",    "Generate CSV, Primitive-Array, Range-Limited",
        "Generate CSV, 2-D Primitive-Array"
    };

    private static int strCSVSorter(Method m)
    {
        if (m.name.equals("CSV"))               return 0;
        if (m.hasParameterNamed("keepRow"))     return 5;

        boolean lim = m.hasParameterNamed("sPos");

        if (m.hasParameterNamed("printNulls"))  return lim ? 2 : 1;
        if (m.hasParameterNamed("tArr"))        return lim ? 2 : 1;

        return lim ? 4 : 3;        
    }

    // ********************************************************************************************
    // Class Torello.Java.StrReplace
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] strReplaceSections =
    {
        "Replace Match-Chars",      "Replace Match-Chars, Case-Insensitive",
        "Replace Match-Strings",    "Replace Match-Strings, Case-Insensitive"
    };

    private static int strReplaceSorter(Method m)
    {
        boolean ci = m.hasParameterNamed("ignoreCase");

        if (m.hasParameterNamed("matchChars")) return ci ? 1 : 0;

        return ci ? 3 : 2;
    }

    // ********************************************************************************************
    // Class Torello.Java.FileRW
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] fileRWSections =
    {
        "Read Text Files",              "Write Text Files",
        "Read Serialized-Object(s)",    "Write Serialized-Object(s)",
        "Move, Copy &amp; Delete",      "Read Text-Numbers"
    };

    private static int fileRWSorter(Method m)
    {
        if (m.name.equals("appendToFile"))  return 1;
        if (m.name.contains("Object"))      return m.name.contains("read") ? 2: 3;
        if (m.name.startsWith("writeFile")) return 1;
        if (m.name.startsWith("loadFile"))  return 0;
        if (m.hasParameterNamed("isCSV"))   return 5;
        if (m.name.equals("getOIS"))        return 2;
        if (m.name.equals("getOOS"))        return 3;

        if (StrCmpr.equalsXOR(m.name, "moveFile", "copyFile", "deleteFiles", "delTree"))
            return 4;

        System.out.print(m.toString());
        throw new UnreachableError();
    }

    // ********************************************************************************************
    // Class Torello.Java.FileTransfer
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] fileTransferSections =
    { "Directory Methods", "Directory-Tree Methods" };

    private static int fileTransferSorter(Method m)
    { return m.name.contains("Recursive") ? 1 : 0; }

    // ********************************************************************************************
    // Class Torello.Java.FileNode
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] fileNodeSections =
    {
        "Main Methods",
        "Initialize &amp; Load Tree",
        "Find Methods",                 
        "Flatten: Directory-Tree Contents", "Flatten: Directory-Tree Contents w/ Variable Output Choice",
        "Single-Directory Contents",        "Single-Directory Contents w/ Variable-Output Choice",
        "FileNode Count",
        "Remove FileNode's from Tree",
        "Methods: Interface java.lang.CharSequence",
        "Lambda Methods", 
        "On-Disk File-Size"
     };

    private static int fileNodeSorter(Method m)
    {
        boolean RTC = m.hasParameterNamed("listChoice");

        if (StrCmpr.equalsXOR(m.name, "getDirContentsSize", "getDirTotalContentsSize"))
            return 11;

        if (m.name.equals("forEach"))                                   return 10;
        if (m.name.startsWith("flatten"))                               return RTC ? 4 : 3;
        if (m.name.startsWith("getDirContents"))                        return RTC ? 6 : 5;
        if (StrCmpr.startsWithXOR(m.name, "count", "num"))              return 7;
        if (StrCmpr.startsWithXOR(m.name, "createRoot", "loadTree"))    return 1;
        if (StrCmpr.startsWithXOR(m.name, "poll", "prune"))             return 8;
        if (StrCmpr.equalsXOR(m.name, "dir", "file"))                   return 2;
        if (StrCmpr.equalsXOR(m.name, "accept", "apply", "ask"))        return 10;
        if (m.name.equals("del"))                                       return 8;

        if (StrCmpr.equalsXOR(m.name, "toString", "subSequence", "length", "charAt"))
            return 9;

        return 0;
    }

    // ********************************************************************************************
    // Class Torello.Java.FileNode.RetTypeChoice
    // Rearrage "Field Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] retTypeChoiceSections =
    {
        "FileNode Instances",
        "FileNode Instances, sorted by File-Name",
        "FileNode Instances, sorted by Full-Path File-Name",
        "FileNode Instances, sorted by On-Disk File-Size",
        "FileNode Instances, sorted by Date",

        "File-Name as String",
        "File-Name as String, sorted",
        "File-Name as String, sorted by On-Disk File-Size",
        "File-Name as String, sorted by Date",

        "Full-Path File-Name as String",
        "Full-Path File-Name as String, sorted",
        "Full-Path File-Name as String, sorted by On-Disk File-Size",
        "Full-Path File-Name as String, sorted by Date",

        "Internal, Protected"
    };

    private static int retTypeChoiceSorter(Field f)
    {
        if (f.hasModifier("protected"))                 return 13;

        if (f.name.startsWith("FILENAME"))              return 5;
        if (f.name.startsWith("FULLPATH"))              return 9;

        if (f.name.startsWith("SORTED_BY_FILENAME_"))   return 1;
        if (f.name.startsWith("SORTED_BY_FULLPATH_"))   return 2;

        if (f.name.startsWith("SORTED_FILENAME"))       return 6;
        if (f.name.startsWith("SORTED_FULLPATH"))       return 10;

        if (f.name.startsWith("SORTED_BY_SIZE_"))
        {
            if (f.name.contains("FILENAME"))            return 7;
            if (f.name.contains("FULLPATH"))            return 11;
            return 3;
        }

        if (f.name.startsWith("SORTED_BY_DATE_"))
        {
            if (f.name.contains("FILENAME"))            return 8;
            if (f.name.contains("FULLPATH"))            return 12;
            return 4;
        }

        return 0;
    }

    // ********************************************************************************************
    // Class Torello.HTML.NodeSearch.TextComparitor
    // Rearrage "Field Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] textComparitorSections =
    {
        "Serializable ID",              "Equals",
        "CSS Classes (Token-Matching)", "CSS Classes, Abbreviated (Token-Matching)",
        "Contains",                     "Contains, Abbreviated",
        "Starts With",                  "Starts With, Abbreviated",
        "Ends With",                    "Ends With, Abbreviated"
    };

    private static int textComparitorSorter(Field f)
    {
        if      (f.name.contains("serial"))  return 0;
        else if (f.name.contains("CSS"))     return 2;
        else if (f.name.contains("EQ"))      return 1;
        else if (f.name.contains("START"))   return 6;
        else if (f.name.contains("SW"))      return 7;
        else if (f.name.contains("END"))     return 8;
        else if (f.name.contains("EW"))      return 9;
        else if (f.name.contains("CONTAIN")) return 4;
        else if (f.name.contains("CN"))      return 5;
        else if (f.name.contains("C"))       return 3; // ORDER is IMPORTANT!  Many contain 'C'

        System.out.print(f.toString());
        throw new UnreachableError();
    }

    // ********************************************************************************************
    // Class Torello.HTML.NodeSearch.HNLI
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] hnliSections =
    { "Method: Next &amp; Previous", "Retrieve Vector Indices (Pointers)", "Retrieve HTMLNode's" };

    private static int hnliSorter(Method m)
    { 
        if (StrCmpr.equalsXOR(m.name, "hasNext", "hasPrevious")) return 0;
        if (m.returnType.equals("int")) return 1;
        return 2;
    }

    // ********************************************************************************************
    // Class Torello.HTML.NodeSearch.HNLIInclusive
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] hnliInclusiveSections =
    { "Method: Next &amp; Previous", "Retrieve Vector-Indices (Pointers)", "Retrieve HTMLNode's" };

    private static int hnliInclusiveSorter(Method m)
    { 
        if (StrCmpr.equalsXOR(m.name, "hasNext", "hasPrevious"))    return 0;
        if (StrCmpr.equalsXOR(m.returnType, "int", "DotPair"))      return 1;

        return 2;
    }

    // ********************************************************************************************
    // Class Torello.HTML.NodeSearch.AbstractHNLI
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] abstractHNLISections =
    {
        "Replacing HTML", "Inserting HTML", "Removing HTML",
        "Cursor Methods", "Internal: Exception-Checks"
    };

    private static int abstractHNLISorter(Method m)
    {
        if (m.hasModifier("protected"))                         return 4;
        if (StrCmpr.containsIgnoreCase(m.name, "Cursor"))       return 3;
        if (StrCmpr.startsWithXOR(m.name, "set", "replace"))    return 0;
        if (StrCmpr.startsWithXOR(m.name, "add", "insert"))     return 1;
        if (m.name.startsWith("remove"))                        return 2;

        System.out.print(m.toString());
        throw new UnreachableError();
    }

    // ********************************************************************************************
    // Class Torello.HTML.HTMLNode
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] htmlNodeSections =
    { "isNode Methods", "Methods: Interface java.lang.Charset", "Methods: Class java.lang.Object" };

    private static int htmlNodeSorter(Method m)
    {
        if (m.name.startsWith("is"))                                    return 0;
        if (StrCmpr.equalsXOR(m.name, "clone", "equals", "hashCode"))   return 2;

        return 1;
    }

    // ********************************************************************************************
    // Class Torello.HTML.NodeSearch.AVT
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] avtSections =
    {
        "Functional-Interface Test",
        "Standard Attribute-<B STYLE='color:red;'>Value</B> Tests",
        "Tests: Keep if Inner-Tag is Not Found",
        "TagNode Equality Tests",
        "Standard-Predicate Default-Methods"
    };

    private static int avtSorter(Method m)
    {
        if (m.name.equals("cmp"))       return 1;
        if (m.name.equals("cmpKIITNF")) return 2;
        if (m.name.equals("test"))      return 0;
        if (m.name.startsWith("is"))    return 3;

        if (StrCmpr.equalsXOR(m.name, "and", "or", "negate")) return 4;

        System.out.print(m.toString());
        throw new UnreachableError();
    }

    // ********************************************************************************************
    // Class Torello.Images.ImageScraper
    // Rearrage "Constructor Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] imageScraperSections =
    {
        "Save Images to Directory",
        "Save Images to Various Directories",
        "Send Images to Image-Receiver Lambda"
    };

    private static int imageScraperSorter(Constructor c)
    {
        if (c.hasParameterNamed("targetDirectory"))             return 0;
        if (c.hasParameterNamed("targetDirectoryRetriever"))    return 1;
        if (c.hasParameterNamed("imageReceiver"))               return 2;

        System.out.print(c.toString());
        throw new UnreachableError();
    }

    // ********************************************************************************************
    // Class Torello.Java.StringParse
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] stringParseSections =
    {
        "General Methods",
        "File, Directory &amp; URL Strings",
        "Date &amp; Time",
        "Number Strings",
        "Base64 Object Serialization",
        "Parentheticals",
        "HTML &amp; Source-Code Strings",
        "Lines of Text"
    };

    private static int stringParseSorter(Method m)
    {
        // *** Main Sorting
        if (StrCmpr.startsWithXOR(m.name, "dotDot", "find", "before", "from"))      return 1;
        if (StrCmpr.startsWithXOR(m.name, "dateStr", "timeStr", "ym", "monthStr"))  return 2;
        if (StrCmpr.startsWithXOR(m.name, "is", "zeroPad"))                         return 3;
        if (StrCmpr.containsIgnoreCase(m.name, "b64"))                              return 4;

        if (    m.name.startsWith("remove")
            &&  StrCmpr.containsOR(m.name, "Braces", "Brackets", "Paren"))          return 5;

        if (StrCmpr.startsWithXOR(m.name, "grep_", "replace", "esc"))               return 6;
        if (m.name.contains("Lines"))                                               return 7;

        // *** A Few special cases
        if (m.name.equals("ordinalIndicator"))                                      return 3;
        if (StrCmpr.equalsXOR(m.name, "ifQuotesStripQuotes", "parseGenericType"))   return 6;
        if (StrCmpr.equalsXOR(m.name, "line", "trimEachLine"))                      return 7;

        // DEFAULT: General String Methods
        return 0;
    }

    // ********************************************************************************************
    // Class Torello.HTML.Util
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] utilSections =
    {
        "Methods",
        "Convenience, Range-Limited: sPos &amp; ePos",
        "Convenience, Range-Limited: DotPair"
    };

    private static int utilSorter(Method m)
    {
        // if (m.name.equals("replaceRange") && m.hasParameterNamed("range")) return 2;

        if (m.hasParameterNamed("sPos"))    return 1;
        if (m.hasParameterNamed("dp"))      return 2;

        return 0;
    }

    // ********************************************************************************************
    // Class Torello.HTML.Surrounding
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] surroundingSections =
    {
        "First Ancestor",
        "All Ancestors",
        "Protected, Internal Methods"
    };

    private static int surroundingSorter(Method m)
    {
        if (m.hasModifier("protected")) return 2;   // REMEMBER, Order matters here

        if (StrCmpr.startsWithIgnoreCase(m.name, "first")) return 0;
        if (StrCmpr.startsWithIgnoreCase(m.name, "all"))   return 1;

        System.out.print(m.toString());
        throw new UnreachableError();
    }

    // ********************************************************************************************
    // Class Torello.HTML.InnerTags
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] innerTagsSections =
    {
        "General Methods",
        "Modify Internal Attribute-Table",
        "List Internal Attribute-Table",
        "Print Internal Attribute-Table",
        "Methods: Event Attributes",
        "Methods: Non-Standard Attributes",
        "Internal Event-Attributes Table",
        "Modify Internal Event-Attributes Table",
    };

    private static int innerTagsSorter(Method m)
    {
        boolean ar = StrCmpr.startsWithXOR(m.name, "add", "remove");

        if (m.name.startsWith("printAll"))                      return 3;
        if (m.name.equals("eventAttributes"))                   return 4;
        if (m.name.equals("eaDescription"))                     return 6;
        if (StrCmpr.containsIgnoreCase(m.name, "nonStandard"))  return 5;
        if (StrCmpr.containsIgnoreCase(m.name, "eventAttribute"))
        {
            if (ar) return 7;
            return 6;
        }

        if (m.name.startsWith("attribute") && m.name.contains("Iterator")) return 2;

        return ar ? 1 : 0;
    }

    // ********************************************************************************************
    // Class Torello.HTML.HTMLTags
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] htmlTagsSections =
    {
        "Basic Methods",
        "List Known Tags",
        "Check Tag Categories",
        "Add or Remove Tags (to/from the Internal-List)",
        "Print the Internal Tag List",
        "Utilities"
    };

    private static int htmlTagsSorter(Method m)
    { 
        if (m.name.startsWith("iterator"))                          return 1;
        if (m.name.startsWith("is"))                                return 2;
        if (StrCmpr.startsWithXOR(m.name, "add", "remove"))         return 3;
        if (m.name.startsWith("printAll"))                          return 4;

        if (m.name.equals("deprecated"))                            return 2;
        if (StrCmpr.equalsXOR(m.name, "hasTag", "getDescription"))  return 0;

        return 5;
    }

    // ********************************************************************************************
    // Class Torello.HTML.Features
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] featuresSections =
    {
        "Retrieve HTML Header Elements",
        "Insert HTML Elements into &lt;HEAD&gt;...&lt;/HEAD&gt;",
        "Internal Methods"
    };

    private static int featuresSorter(Method m)
    {
        if (m.name.startsWith("get"))               return 0;
        if (m.name.startsWith("insert"))            return 1;
        if (m.name.startsWith("has"))               return 0;
        if (m.name.equals("checkForSingleQuote"))   return 2;

        System.out.print(m.toString());
        throw new UnreachableError();
    }

    // ********************************************************************************************
    // Class Torello.HTML.Features.Meta
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] featuresMetaSections =
    {
        "Retrieve HTML &lt;META&gt; Tags",
        "Insert HTML &lt;META&gt; Tags into &lt;HEAD&gt;...&lt;/HEAD&gt;"
    };

    private static int featuresMetaSorter(Method m)
    {
        if (m.name.startsWith("get"))       return 0;
        if (m.name.startsWith("insert"))    return 1;
        if (m.name.startsWith("has"))       return 0;

        System.out.print(m.toString());
        throw new UnreachableError();
    }

    // ********************************************************************************************
    // Class Torello.HTML.PageStats
    // Rearrage "Field Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] pageStatsSections =
    {
        "Serializable ID",
        "General Fields",
        "Opening TagNode Elements, Count",
        "Closing TagNode Elements, Count",
        "Singleton TagNode Elements, Count",
        "HTML Attributes, Count"
    };

    private static int pageStatsSorter(Field f)
    {
        if (f.name.equals("serialVersionUID"))
            return 0;

        if (StrCmpr.equalsXOR(
                f.name, "numNewLines", "numNodes", "numTagNodes", "numTextNodes",
                "numCommentNodes", "hash"
                )
            )
            return 1;

        if (f.name.startsWith("numOpen"))                           return 2;
        if (f.name.startsWith("numClosed"))                         return 3;
        if (f.name.startsWith("num"))                               return 4;
        if (f.name.startsWith("has"))                               return 5;

        return 1;
    }

    // ********************************************************************************************
    // Class Torello.HTML.HTTPCodes
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] httpCodesSections =
    {
        "HTTP-Exception to Status Code",
        "HTTP-Exception to Message-String",
        "Retrieve HTTP-Code Information",
        "Print HTTP-Code Internal-Lists",
        "Retrieve HTTP-Code Internal-Lists",
        "Protected, Utiliity"
    };

    private static int httpCodesSorter(Method m)
    {
        if (m.name.equals("getCode"))                       return 0;
        if (m.hasModifier("protected"))                     return 5;
        if (m.hasParameterNamed("e"))                       return 1;
        if (m.hasParameterNamed("httpStatusCode"))          return 2;
        if (m.name.startsWith("printAll"))                  return 3;
        if (StrCmpr.containsIgnoreCase(m.name, "Iterator")) return 4;

        System.out.print(m.toString());
        throw new UnreachableError();
    }

    // ********************************************************************************************
    // Class Torello.HTML.Debug
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] debugSections =
    {
        "Print-Style Methods (Lambdas)",
        "Print Methods",
        "Print Methods, Range-Limited",
        "Print Methods, Vector-Index Array Limited"
    };

    private static int debugSorter(Method m)
    {
        if (m.name.length() == 1)           return 0;
        if (m.hasParameterNamed("sPos"))    return 2;
        if (m.hasParameterNamed("dp"))      return 2;
        if (m.hasParameterNamed("posArr"))  return 3;

        return 1;
    }

    // ********************************************************************************************
    // Class Torello.HTML.Scrape
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] scrapeSections =
    {
        "Open HTTP Connection, Get Reader",
        "Open HTTP Connection, Get Reader &amp; Headers",
        "Read / Scrape Contents to String",
        "Read / Scrape Contents to Vector&lt;String&gt;",
        "Read / Scrape Contents to StringBuffer, Range-Limited",
        "HTTP Header Methods"
    };

    private static int scrapeSorter(Method m)
    {
        if (m.name.startsWith("openConnGetHeader")) return 1;
        if (m.name.startsWith("openConn"))          return 0;
        if (m.name.equals("scrapePage"))            return 2;
        if (m.name.equals("scrapePageToVector"))    return 3;
        if (m.name.equals("getHTML"))               return 4;

        if (StrCmpr.equalsXOR
            (m.name, "usesDeflate", "usesGZIP", "httpHeadersToString", "checkHTTPCompression")
            )
            return 5;

        System.out.print(m.toString());
        throw new UnreachableError();
    }

    // ********************************************************************************************
    // Class Torello.HTML.TagNode.AttrRegEx
    // Rearrage "Field Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] attrRegExSections =
    {
        "HTML Attribute Regular-Expressions",
        "Regular-Expressions as Predicate&lt;String&gt;"
    };

    private static int attrRegExSorter(Field f)
    { return f.name.endsWith("PRED") ? 1 : 0; }

    // ********************************************************************************************
    // Class Torello.HTML.StringParse
    // Rearrage "Field Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] stringParseFieldSections =
    {
        "Regular-Expressions",
        "Predicate<String>",
        "String",
        "Protected Arrays"
    };

    private static int stringParseFieldSorter(Field f)
    {
        if (f.type.equals("java.util.regex.Pattern"))                           return 0;
        if (f.type.equals("java.util.function.Predicate<java.lang.String>"))    return 1;
        if (f.type.equals("java.lang.String"))                                  return 2;
        if (f.hasModifier("protected"))                                         return 3;

        System.out.println("Field: " + f);
        throw new UnreachableError();
    }

    // ********************************************************************************************
    // Class Torello.HTML.DotPair
    // Rearrage "Method Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] dotPairSections =
    {
        "Basic Methods",
        "Collate Multiple DotPair's to a Single Index-List",
        "Collate Multiple DotPair's to a Single Index-List, Include End-Points Only",
        "Retrieve HTMLNode's from an HTML-Vector, using one or more DotPair's",
        "Methods: Class java.lang.Object",
        "Methods: Interface java.lang.Iterable",
        "Methods: Interface java.lang.Comparable"
    };

    private static int dotPairSorter(Method m)
    {
        if (m.name.equals("equals"))                                    return 4;  // Must come first
        if (m.returnType.equals("boolean"))                             return 0;
        if (m.name.equals("size"))                                      return 0;
        if (m.name.startsWith("endPoints"))                             return 2;  // REVERSED!
        if (m.hasParameterNamed("dpi"))                                 return 1;  // Don't Change!
        if (m.hasParameterNamed("html"))                                return 3;
        if (StrCmpr.equalsXOR(m.name, "toString", "hashCode", "clone")) return 4;
        if (m.name.equals("iterator"))                                  return 5;
        if (m.name.equals("compareTo"))                                 return 6;

        System.out.println("Method: " + m.toString());
        throw new UnreachableError();
    }

    // ********************************************************************************************
    // Class Torello.HTML.DotPair
    // Rearrage "Field Summary" Section on JavaDoc HTML Page
    // ********************************************************************************************

    private static final String[] dotPairFieldSections =
    {
        "Serializable ID",
        "Start &amp; End Field",
        "Alternate Sort Comparator"
    };

    private static int dotPairFieldSorter(Field f)
    {
        if (f.name.equals("serialVersionUID"))          return 0;
        if (StrCmpr.equalsXOR(f.name, "start", "end"))  return 1;
        if (f.name.equals("comp2"))                     return 2;

        System.out.println("Field: " + f.toString());
        throw new UnreachableError();
    }


    // ********************************************************************************************
    // ********************************************************************************************
    // Arrays passed to "Upgrade.setSummaryRearrange(String[], String[][], FCM[], ToIntFunction[]"
    // ********************************************************************************************
    // ********************************************************************************************

    // These are all of the class, interfaces and enums that shall have a "Summary Section" inside
    // their Java Doc HTML Page rearranged using categories / sub-sections.

    public static final String[] ciets =
    {
        "Torello.HTML.TagNode",                     "Torello.HTML.Links",           "Torello.HTML.Attributes",
        "Torello.HTML.HTMLPage",                    "Torello.HTML.HTMLPageMWT",     "Torello.HTML.NodeSearch.TextComparitor",
        "Torello.Java.StrCmpr",                     "Torello.Java.StrTokCmpr",      "Torello.Java.StrTokIndexOf",
        "Torello.Java.StrCSV",                      "Torello.Java.StrIndexOf",      "Torello.Java.StrReplace",
        "Torello.Java.FileRW",                      "Torello.Java.FileTransfer",    "Torello.Java.FileNode",
        "Torello.Java.FileNode.RetTypeChoice",      "Torello.HTML.NodeSearch.HNLI", "Torello.HTML.NodeSearch.HNLIInclusive",
        "Torello.HTML.NodeSearch.AbstractHNLI",     "Torello.HTML.HTMLNode",        "Torello.HTML.NodeSearch.AVT",
        "Torello.HTML.Tools.Images.ImageScraper",   "Torello.Java.StringParse",     "Torello.HTML.Util",
        "Torello.HTML.Surrounding",                 "Torello.HTML.InnerTags",       "Torello.HTML.HTMLTags",
        "Torello.HTML.Features",                    "Torello.HTML.Features.Meta",   "Torello.HTML.PageStats",
        "Torello.HTML.HTTPCodes",                   "Torello.HTML.Debug",           "Torello.HTML.Scrape",
        "Torello.HTML.TagNode.AttrRegEx",           "Torello.Java.StringParse",     "Torello.HTML.DotPair",
        "Torello.HTML.DotPair"
    };

    // This two-dimensional-array is a "Parallel Array" to the previous array.  Each of the sub-arrays
    // in the top-level array contains the actual names of the categories for each of the CIET's above.

    public static final String[][] sectionNames =
    { 
        tagNodeSections,        linksSections,              attributesSections,
        htmlPageSections,       htmlPageSections,           textComparitorSections,
        strCmprSections,        strTokCmprSections,         strTokIndexOfSections,
        strCSVSections,         strIndexOfSections,         strReplaceSections,
        fileRWSections,         fileTransferSections,       fileNodeSections,
        retTypeChoiceSections,  hnliSections,               hnliInclusiveSections,
        abstractHNLISections,   htmlNodeSections,           avtSections,
        imageScraperSections,   stringParseSections,        utilSections,
        surroundingSections,    innerTagsSections,          htmlTagsSections,
        featuresSections,       featuresMetaSections,       pageStatsSections,
        httpCodesSections,      debugSections,              scrapeSections,
        attrRegExSections,      stringParseFieldSections,   dotPairSections,
        dotPairFieldSections
    };

    // This identifies to the Upgrader Tool whether the "Summary Section" that is to be rearranged and
    // divided into sub-sections is the "Field Summaries", "Method Summaries" or "Constructor Summaries"
    // section of the Java HTML Documentation Page for that CIET.
    // This array is also a "Parallel ARray" to the above two arrays.

    public static final FCM[] sections =
    {
        FCM.Method,         FCM.Method,     FCM.Method, 
        FCM.Method,         FCM.Method,     FCM.Field,
        FCM.Method,         FCM.Method,     FCM.Method,
        FCM.Method,         FCM.Method,     FCM.Method,
        FCM.Method,         FCM.Method,     FCM.Method,
        FCM.Field,          FCM.Method,     FCM.Method,
        FCM.Method,         FCM.Method,     FCM.Method,
        FCM.Constructor,    FCM.Method,     FCM.Method,
        FCM.Method,         FCM.Method,     FCM.Method,
        FCM.Method,         FCM.Method,     FCM.Field,
        FCM.Method,         FCM.Method,     FCM.Method,
        FCM.Field,          FCM.Field,      FCM.Method,
        FCM.Field
    };

    // This is the last Parallel-Array.  These are the sorting functions that sort the fields, methods
    // or constructors inside the CIET (Class, Interface or Enum) into the categories listed.
    //
    // NOTE: The Generic-Type Parameter (Method, Field or Constructor) must be consistent with the
    //       FCM type listed above, or else when the sorter is run, it will throw an exxception!
    //
    // The "SuppressWarnings("rawTypes") *MUST* be used on this array, or the compiler will start
    // complaining about Raw-Types.  This is only a compile-time check, and is not absolutely
    // necessary as long as the FCM and the Generic-Type are the same.
    //
    // NOTE: If the FCM.Method, FCM.Field, FCM.Constructor *does not* equal the Generic-Type Parameter,
    //       then the sorter-lambda you provide here will cause a type-checking exception at runtime!

    @SuppressWarnings("rawtypes")
    public static final ToIntFunction[] sorters =
    { 
        (ToIntFunction<Method>)         SummRearrange::tagNodeSorter,
        (ToIntFunction<Method>)         SummRearrange::linksSorter,
        (ToIntFunction<Method>)         SummRearrange::attributesSorter,

        (ToIntFunction<Method>)         SummRearrange::htmlPageSorter,
        (ToIntFunction<Method>)         SummRearrange::htmlPageSorter,
        (ToIntFunction<Field>)          SummRearrange::textComparitorSorter,

        (ToIntFunction<Method>)         SummRearrange::strCmprSorter,
        (ToIntFunction<Method>)         SummRearrange::strTokCmprSorter,
        (ToIntFunction<Method>)         SummRearrange::strTokIndexOfSorter,

        (ToIntFunction<Method>)         SummRearrange::strCSVSorter,
        (ToIntFunction<Method>)         SummRearrange::strIndexOfSorter,
        (ToIntFunction<Method>)         SummRearrange::strReplaceSorter,

        (ToIntFunction<Method>)         SummRearrange::fileRWSorter,
        (ToIntFunction<Method>)         SummRearrange::fileTransferSorter,
        (ToIntFunction<Method>)         SummRearrange::fileNodeSorter,

        (ToIntFunction<Field>)          SummRearrange::retTypeChoiceSorter,
        (ToIntFunction<Method>)         SummRearrange::hnliSorter,
        (ToIntFunction<Method>)         SummRearrange::hnliInclusiveSorter,

        (ToIntFunction<Method>)         SummRearrange::abstractHNLISorter,
        (ToIntFunction<Method>)         SummRearrange::htmlNodeSorter,
        (ToIntFunction<Method>)         SummRearrange::avtSorter,

        (ToIntFunction<Constructor>)    SummRearrange::imageScraperSorter,
        (ToIntFunction<Method>)         SummRearrange::stringParseSorter,
        (ToIntFunction<Method>)         SummRearrange::utilSorter,

        (ToIntFunction<Method>)         SummRearrange::surroundingSorter,
        (ToIntFunction<Method>)         SummRearrange::innerTagsSorter,
        (ToIntFunction<Method>)         SummRearrange::htmlTagsSorter,

        (ToIntFunction<Method>)         SummRearrange::featuresSorter,
        (ToIntFunction<Method>)         SummRearrange::featuresMetaSorter,
        (ToIntFunction<Field>)          SummRearrange::pageStatsSorter,

        (ToIntFunction<Method>)         SummRearrange::httpCodesSorter,
        (ToIntFunction<Method>)         SummRearrange::debugSorter,
        (ToIntFunction<Method>)         SummRearrange::scrapeSorter,

        (ToIntFunction<Field>)          SummRearrange::attrRegExSorter,
        (ToIntFunction<Field>)          SummRearrange::stringParseFieldSorter,
        (ToIntFunction<Method>)         SummRearrange::dotPairSorter,

        (ToIntFunction<Field>)          SummRearrange::dotPairFieldSorter,

    };
}