org.apache.log4j.chainsaw

## Class ColumnComparator

- java.lang.Object
- - org.apache.log4j.chainsaw.ColumnComparator

- All Implemented Interfaces:
    Comparator

      public class ColumnComparator
      extends Object
      implements Comparator

  Author:
    Claude Duguay, Paul Smith <psmith@apache.org>, Scott Deboy <sdeboy@apache.org>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `ascending`
    `protected String` | `columnName`
    `protected int` | `index`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ColumnComparator(String columnName, int index, boolean ascending)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(Object o1, Object o2)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Comparator

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Field Detail

    - #### index

          protected int index

    - #### ascending

          protected boolean ascending

    - #### columnName

          protected String columnName

  - ### Constructor Detail

    - #### ColumnComparator

          public ColumnComparator(String columnName,
                                  int index,
                                  boolean ascending)

  - ### Method Detail

    - #### compare

          public int compare(Object o1,
                             Object o2)

      Specified by:
        `compare` in interface `Comparator`

Copyright © 2002-2018 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache Chainsaw, Chainsaw, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.