Style Intelligence v12.0

inetsoft.report
Interface Comparer

All Superinterfaces:
Comparator, Serializable
All Known Implementing Classes:
BooleanComparer, DateComparer, DateTimeComparer, DefaultComparer, DimensionComparer, DimensionSortOrder, NumericComparer, ReversedComparer, RoleComparer, SectionBand.Separator, SortOrder, TextComparer, TimeComparer

public interface Comparer
extends Serializable, Comparator

Object comparison interface. This interface is used by some classes to define a custom comparison ordering.


Field Summary
static double NEGATIVE_DOUBLE_ERROR
          Negative double error.
static float NEGATIVE_FLOAT_ERROR
          Negative float error.
static double POSITIVE_DOUBLE_ERROR
          Positive double error.
static float POSITIVE_FLOAT_ERROR
          Positive float error.
 
Method Summary
 int compare(double v1, double v2)
          This method should return > 0 if v1 is greater than v2, 0 if v1 is equal to v2, or < 0 if v1 is less than v2.
 int compare(float v1, float v2)
          This method should return > 0 if v1 is greater than v2, 0 if v1 is equal to v2, or < 0 if v1 is less than v2.
 int compare(int v1, int v2)
          This method should return > 0 if v1 is greater than v2, 0 if v1 is equal to v2, or < 0 if v1 is less than v2.
 int compare(long v1, long v2)
          This method should return > 0 if v1 is greater than v2, 0 if v1 is equal to v2, or < 0 if v1 is less than v2.
 int compare(Object v1, Object v2)
          This method should return > 0 if v1 is greater than v2, 0 if v1 is equal to v2, or < 0 if v1 is less than v2.
 int compare(short v1, short v2)
          This method should return > 0 if v1 is greater than v2, 0 if v1 is equal to v2, or < 0 if v1 is less than v2.
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

NEGATIVE_DOUBLE_ERROR

static final double NEGATIVE_DOUBLE_ERROR
Negative double error.

See Also:
Constant Field Values

POSITIVE_DOUBLE_ERROR

static final double POSITIVE_DOUBLE_ERROR
Positive double error.

See Also:
Constant Field Values

NEGATIVE_FLOAT_ERROR

static final float NEGATIVE_FLOAT_ERROR
Negative float error.

See Also:
Constant Field Values

POSITIVE_FLOAT_ERROR

static final float POSITIVE_FLOAT_ERROR
Positive float error.

See Also:
Constant Field Values
Method Detail

compare

int compare(Object v1,
            Object v2)
This method should return > 0 if v1 is greater than v2, 0 if v1 is equal to v2, or < 0 if v1 is less than v2. It must handle null values for the comparison values.

Specified by:
compare in interface Comparator
Parameters:
v1 - comparison value.
v2 - comparison value.
Returns:
< 0, 0, or > 0 for v1v2.

compare

int compare(double v1,
            double v2)
This method should return > 0 if v1 is greater than v2, 0 if v1 is equal to v2, or < 0 if v1 is less than v2. It must handle null values for the comparison values.

Parameters:
v1 - comparison value.
v2 - comparison value.
Returns:
< 0, 0, or > 0 for v1v2.

compare

int compare(float v1,
            float v2)
This method should return > 0 if v1 is greater than v2, 0 if v1 is equal to v2, or < 0 if v1 is less than v2. It must handle null values for the comparison values.

Parameters:
v1 - comparison value.
v2 - comparison value.
Returns:
< 0, 0, or > 0 for v1v2.

compare

int compare(long v1,
            long v2)
This method should return > 0 if v1 is greater than v2, 0 if v1 is equal to v2, or < 0 if v1 is less than v2. It must handle null values for the comparison values.

Parameters:
v1 - comparison value.
v2 - comparison value.
Returns:
< 0, 0, or > 0 for v1v2.

compare

int compare(int v1,
            int v2)
This method should return > 0 if v1 is greater than v2, 0 if v1 is equal to v2, or < 0 if v1 is less than v2. It must handle null values for the comparison values.

Parameters:
v1 - comparison value.
v2 - comparison value.
Returns:
< 0, 0, or > 0 for v1v2.

compare

int compare(short v1,
            short v2)
This method should return > 0 if v1 is greater than v2, 0 if v1 is equal to v2, or < 0 if v1 is less than v2. It must handle null values for the comparison values.

Parameters:
v1 - comparison value.
v2 - comparison value.
Returns:
< 0, 0, or > 0 for v1v2.

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.