org.apache.poi.poifs.property

## Class DirectoryProperty.PropertyComparator

- java.lang.Object
- - org.apache.poi.poifs.property.DirectoryProperty.PropertyComparator

- All Implemented Interfaces:
    java.io.Serializable, java.util.Comparator<Property>
  Enclosing class:
    DirectoryProperty

      public static class DirectoryProperty.PropertyComparator
      extends java.lang.Object
      implements java.util.Comparator<Property>, java.io.Serializable

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropertyComparator()`

  - ### Method Summary

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

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

- - ### Constructor Detail

    - #### PropertyComparator

          public PropertyComparator()

  - ### Method Detail

    - #### compare

          public int compare(Property o1,
                             Property o2)

      compare method. Assumes both parameters are non-null instances of Property. One property is less than another if its name is shorter than the other property's name. If the names are the same length, the property whose name comes before the other property's name, alphabetically, is less than the other property.
      Specified by:
        `compare` in interface `java.util.Comparator<Property>`
      Parameters:
        `o1` - first object to compare, better be a Property
        `o2` - second object to compare, better be a Property
      Returns:
        negative value if o1 < o2, zero if o1 == o2, positive value if o1 > o2.

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.