Holger's Java API

## com.antelmann.db
Class PropertyEntryComparator<T extends PropertyEntry>

    java.lang.Object
      com.antelmann.db.PropertyEntryComparator<T>

All Implemented Interfaces:
  Comparator<T>

    public class PropertyEntryComparator<T extends PropertyEntry>

extends Object
implements Comparator<T>

A special comparator that compares based on given property values of an PropertyEntry. The property value itself is compared via UniversalComparator.

Since:
  4. Oktober 2006, 16:20
Author:
  Holger Antelmann
See Also:
  `UniversalComparator`

Constructor Summary
`PropertyEntryComparator(String... keys)` the PropertyEntry is sorted first by the first given key, then (if the first was non-descriminating) the next, and so on.

Method Summary
`int` `compare(T entity1, T entity2)`
`String[]` `getComparisonKeys()`
`UniversalComparator` `getUniversalComparator()` returns the embedded UniversalComparator in use

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

### PropertyEntryComparator

    public PropertyEntryComparator(String... keys)

  the PropertyEntry is sorted first by the first given key, then (if the first was non-descriminating) the next, and so on.

Method Detail

### getUniversalComparator

    public UniversalComparator getUniversalComparator()

  returns the embedded UniversalComparator in use

### getComparisonKeys

    public String[] getComparisonKeys()

### compare

    public int compare(T entity1,
                       T entity2)

  Specified by:
    `compare` in interface `Comparator<T extends PropertyEntry>`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads