com.gisgraphy.webapp.taglib

## Class CountryTag.LabelValueComparator

- java.lang.Object
- - com.gisgraphy.webapp.taglib.CountryTag.LabelValueComparator

- All Implemented Interfaces:
    Comparator
  Enclosing class:
    CountryTag

      public class CountryTag.LabelValueComparator
      extends Object
      implements Comparator

  Class to compare LabelValues using their labels with locale-sensitive behaviour.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CountryTag.LabelValueComparator(Locale locale)` Creates a new LabelValueComparator object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(Object o1, Object o2)` Compares the localized labels of two LabelValues.

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

- - ### Constructor Detail

    - #### CountryTag.LabelValueComparator

          public CountryTag.LabelValueComparator(Locale locale)

      Creates a new LabelValueComparator object.
      Parameters:
        `locale` - The Locale used for localized String comparison.

  - ### Method Detail

    - #### compare

          public final int compare(Object o1,
                    Object o2)

      Compares the localized labels of two LabelValues.
      Specified by:
        `compare` in interface `Comparator`
      Parameters:
        `o1` - The first LabelValue to compare.
        `o2` - The second LabelValue to compare.
      Returns:
        The value returned by comparing the localized labels.

Copyright © 2015. All rights reserved.