org.ikasan.console.pointtopointflow
Class PointToPointFlowComparator

java.lang.Object
  extended by org.ikasan.console.pointtopointflow.PointToPointFlowComparator
All Implemented Interfaces:
Comparator<PointToPointFlow<Module>>

public class PointToPointFlowComparator
extends Object
implements Comparator<PointToPointFlow<Module>>

PointToPointFlowComparator is an implementation of Comparator for PointToPointFlow that compares two such objects based on their Module children. Needs to be able to accurately sort:

 FromModule ToModule
 -------------------
 1          2
 NULL       1
 3          NULL
 2          3
 
 I'd want it to end up like this:
 
 FromModule ToModule
 --------------------
 NULL       1
 1          2
 2          3
 3          NULL
 

Author:
Ikasan Development Team

Constructor Summary
PointToPointFlowComparator()
           
 
Method Summary
 int compare(PointToPointFlow<Module> ptpf1, PointToPointFlow<Module> ptpf2)
          Compare two instances of PointToPointFlow
 
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

PointToPointFlowComparator

public PointToPointFlowComparator()
Method Detail

compare

public int compare(PointToPointFlow<Module> ptpf1,
                   PointToPointFlow<Module> ptpf2)
Compare two instances of PointToPointFlow

Specified by:
compare in interface Comparator<PointToPointFlow<Module>>
Parameters:
ptpf1 - - The first PointToPointFlow to compare
ptpf2 - - The second PointToPointFlow to compare
Returns:
comparison result


Copyright © 2007-2014 Ikasan. All Rights Reserved.