org.apache.directory.mavibot.btree.comparator

## Class StringComparator

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

- All Implemented Interfaces:
    Comparator<String>

      public class StringComparator
      extends Object
      implements Comparator<String>

  Compares Strings
  Author:
    Apache Directory Project

- - ### Field Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(String string1, String string2)` Compare two Strings.

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

      A static instance of a StringComparator

  - ### Method Detail

    - #### compare

          public int compare(String string1,
                    String string2)

      Compare two Strings.
      Specified by:
        `compare` in interface `Comparator<String>`
      Parameters:
        `string1` - First String
        `string2` - Second String
      Returns:
        1 if string1 > String2, 0 if string1 == String2, -1 if string1 < String2

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