Top Description Inners Fields Constructors Methods
org.jooq.impl

pack-priv final Class Comparators

extends Object
Class Inheritance
Static Imports
java.util.Comparator.comparing, org.jooq.SortOrder.ASC, .SortOrder.DEFAULT, .TableOptions.TableType.TABLE, org.jooq.impl.DSL.noCondition, org.jooq.tools.StringUtils.defaultIfNull

Commonly used comparators and related utilities.
Author
Lukas Eder

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
pack-priv static final Comparator<Check<?>>
pack-priv static final Comparator<ForeignKey<?, ?>>
pack-priv static final Comparator<Index>
pack-priv static final Comparator<Key<?>>
pack-priv static final Comparator<Named>
pack-priv static final Comparator<Table<?>>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CHECK_COMPback to summary
pack-priv static final Comparator<Check<?>> CHECK_COMP
FOREIGN_KEY_COMPback to summary
pack-priv static final Comparator<ForeignKey<?, ?>> FOREIGN_KEY_COMP
INDEX_COMPback to summary
pack-priv static final Comparator<Index> INDEX_COMP
KEY_COMPback to summary
pack-priv static final Comparator<Key<?>> KEY_COMP
NAMED_COMPback to summary
pack-priv static final Comparator<Named> NAMED_COMP
TABLE_VIEW_COMPback to summary
pack-priv static final Comparator<Table<?>> TABLE_VIEW_COMP

Constructor Detail

Comparatorsback to summary
pack-priv Comparators()
org.jooq.impl back to summary

private final Class Comparators.ForeignKeyComparator

extends Object
implements Comparator<ForeignKey<?, ?>>
Class Inheritance
All Implemented Interfaces
java.util.Comparator

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
compare(ForeignKey<?, ?>
the first object to be compared.
o1
,
ForeignKey<?, ?>
the second object to be compared.
o2
)

Implements java.util.Comparator.compare.

Compares its two arguments for order.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ForeignKeyComparatorback to summary
private ForeignKeyComparator()

Method Detail

compareback to summary
public int compare(ForeignKey<?, ?> o1, ForeignKey<?, ?> o2)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Parameters
o1:ForeignKey<?, ?>

the first object to be compared.

o2:ForeignKey<?, ?>

the second object to be compared.

Returns:int

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Annotations
@Override
org.jooq.impl back to summary

private final Class Comparators.IndexComparator

extends Object
implements Comparator<Index>
Class Inheritance
All Implemented Interfaces
java.util.Comparator

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
compare(Index
the first object to be compared.
o1
,
Index
the second object to be compared.
o2
)

Implements java.util.Comparator.compare.

Compares its two arguments for order.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

IndexComparatorback to summary
private IndexComparator()

Method Detail

compareback to summary
public int compare(Index o1, Index o2)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Parameters
o1:Index

the first object to be compared.

o2:Index

the second object to be compared.

Returns:int

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Annotations
@Override
org.jooq.impl back to summary

private final Class Comparators.KeyComparator

extends Object
implements Comparator<Key<?>>
Class Inheritance
All Implemented Interfaces
java.util.Comparator

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
compare(Key<?>
the first object to be compared.
o1
,
Key<?>
the second object to be compared.
o2
)

Implements java.util.Comparator.compare.

Compares its two arguments for order.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

KeyComparatorback to summary
private KeyComparator()

Method Detail

compareback to summary
public int compare(Key<?> o1, Key<?> o2)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Parameters
o1:Key<?>

the first object to be compared.

o2:Key<?>

the second object to be compared.

Returns:int

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Annotations
@Override