com.trackstudio.tools
Class PropertyComparator

java.lang.Object
  extended by com.trackstudio.tools.PropertyComparator
All Implemented Interfaces:
java.util.Comparator
Direct Known Subclasses:
TaskRelatedInfoComparator

public class PropertyComparator
extends java.lang.Object
implements java.util.Comparator

Класс-компаратор для сравнения настроек


Constructor Summary
PropertyComparator()
          Конструктор
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Сравнивает два свойства
static int compare(PropertyContainer a, PropertyContainer b)
          Сравнивает два свойства
static int compareIgnoreCase(PropertyContainer a, PropertyContainer b)
          Сравнивает два свойства
static int compareIgnoreCase(PropertyContainer a, PropertyContainer b, int limit)
          Сравнивает два свойства без учета регистра
protected static int compareProperties(PropertyContainer a, PropertyContainer b)
          Сравнивает два свойства
protected static int comparePropertiesIgnoreCase(PropertyContainer a, PropertyContainer b)
          Сравнивает два свойства без учета регистра
protected static int comparePropertiesIgnoreCase(PropertyContainer a, PropertyContainer b, int limit)
          Сравнивает два свойства без учета регистра
static boolean isEquals(PropertyContainer a, PropertyContainer b)
          Сравнивает два свойства
 
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

PropertyComparator

public PropertyComparator()
Конструктор

Method Detail

compareProperties

protected static int compareProperties(PropertyContainer a,
                                       PropertyContainer b)
Сравнивает два свойства

Parameters:
a - одно свойства
b - второе свойство
Returns:
+1, 0, -1

comparePropertiesIgnoreCase

protected static int comparePropertiesIgnoreCase(PropertyContainer a,
                                                 PropertyContainer b)
Сравнивает два свойства без учета регистра

Parameters:
a - одно свойства
b - второе свойство
Returns:
+1, 0, -1

comparePropertiesIgnoreCase

protected static int comparePropertiesIgnoreCase(PropertyContainer a,
                                                 PropertyContainer b,
                                                 int limit)
Сравнивает два свойства без учета регистра

Parameters:
a - одно свойства
b - второе свойство
limit - предел
Returns:
+1, 0, -1

compare

public static int compare(PropertyContainer a,
                          PropertyContainer b)
Сравнивает два свойства

Parameters:
a - одно свойства
b - второе свойство
Returns:
+1, 0, -1

compareIgnoreCase

public static int compareIgnoreCase(PropertyContainer a,
                                    PropertyContainer b)
Сравнивает два свойства

Parameters:
a - одно свойства
b - второе свойство
Returns:
+1, 0, -1

compareIgnoreCase

public static int compareIgnoreCase(PropertyContainer a,
                                    PropertyContainer b,
                                    int limit)
Сравнивает два свойства без учета регистра

Parameters:
a - одно свойства
b - второе свойство
limit - предел
Returns:
+1, 0, -1

isEquals

public static boolean isEquals(PropertyContainer a,
                               PropertyContainer b)
Сравнивает два свойства

Parameters:
a - одно свойства
b - второе свойство
Returns:
TRUE - равны, FALSE - нет

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Сравнивает два свойства

Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - одно свойства
o2 - второе свойство


Copyright © 2002-2009 TrackStudio, Ltd. All Rights Reserved.