org.apache.directory.mavibot.btree.comparator

## Class CharArrayComparator

- java.lang.Object
- - org.apache.directory.mavibot.btree.comparator.CharArrayComparator

- All Implemented Interfaces:
    Comparator<char[]>

      public class CharArrayComparator
      extends Object
      implements Comparator<char[]>

  Compares char arrays
  Author:
    Apache Directory Project

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static CharArrayComparator` | `INSTANCE` A static instance of a CharArrayComparator

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(char[] charArray1, char[] charArray2)` Compare two char arrays.

    - ### 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

      `equals`

- - ### Field Detail

    - #### INSTANCE

          public static final CharArrayComparator INSTANCE

      A static instance of a CharArrayComparator

  - ### Method Detail

    - #### compare

          public int compare(char[] charArray1,
                    char[] charArray2)

      Compare two char arrays.
      Specified by:
        `compare` in interface `Comparator<char[]>`
      Parameters:
        `charArray1` - First char array
        `charArray2` - Second char array
      Returns:
        1 if charArray1 > charArray2, 0 if charArray1 == charArray2, -1 if charArray1 < charArray2

Copyright © 2012–2015 Apache Mavibot Project Parent. All rights reserved.