org.apache.directory.mavibot.btree.comparator

## Class BooleanArrayComparator

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

- All Implemented Interfaces:
    Comparator<boolean[]>

      public class BooleanArrayComparator
      extends Object
      implements Comparator<boolean[]>

  Compares boolean arrays. A boolean is considered as below the other one if the first boolean is false when the second one is true.
  Author:
    Apache Directory Project

- - ### Field Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(boolean[] booleanArray1, boolean[] booleanArray2)` Compare two boolean 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 BooleanArrayComparator INSTANCE

      A static instance of a BooleanArrayComparator

  - ### Method Detail

    - #### compare

          public int compare(boolean[] booleanArray1,
                    boolean[] booleanArray2)

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

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