GrammarScope  4.0.0
Public Member Functions | Private Attributes | List of all members
grammarscope.jung2.ComposedComparator< T > Class Template Reference
Inheritance diagram for grammarscope.jung2.ComposedComparator< T >:
Inheritance graph
[legend]
Collaboration diagram for grammarscope.jung2.ComposedComparator< T >:
Collaboration graph
[legend]

Public Member Functions

 ComposedComparator (final Comparator< T > comparator1, final Comparator< T > comparator2)
 
int compare (final T e1, final T e2)
 

Private Attributes

final Comparator< T > comparator1
 
final Comparator< T > comparator2
 

Detailed Description

Composed comparator (use comparator 1, if it yields 0 use comparator 2)

Parameters
<T>type of object
Author
Bernard Bou

Constructor & Destructor Documentation

◆ ComposedComparator()

grammarscope.jung2.ComposedComparator< T >.ComposedComparator ( final Comparator< T >  comparator1,
final Comparator< T >  comparator2 
)

Constructor

Parameters
comparator1main comparator
comparator2secondary comparator

Member Function Documentation

◆ compare()

int grammarscope.jung2.ComposedComparator< T >.compare ( final T  e1,
final T  e2 
)

Member Data Documentation

◆ comparator1

final Comparator<T> grammarscope.jung2.ComposedComparator< T >.comparator1
private

Main comparator

◆ comparator2

final Comparator<T> grammarscope.jung2.ComposedComparator< T >.comparator2
private

Secondary comparator, used if main comparator yields 0


The documentation for this class was generated from the following file: