Class OnLeafComparator
java.lang.Object
xal.extension.tracewinimporter.openxalexporter.OnLeafComparator
- All Implemented Interfaces:
Comparator<Subsystem>
Compares all brothers in the tree according to leaf ordering
- Author:
- Ivo List <ivo.list@cosylab.com>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintvoidinit(Collection<Subsystem> systems) sortSubsystems(Collection<Subsystem> subsystems) Sorts the subsystems into links according to theSubsystem.getPreviousSubsystem()field.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
OnLeafComparator
public OnLeafComparator()
-
-
Method Details
-
init
-
compare
- Specified by:
comparein interfaceComparator<Subsystem>
-
sortSubsystems
Sorts the subsystems into links according to theSubsystem.getPreviousSubsystem()field.- Parameters:
subsystems-Collection<Subsystem>to be sorted.- Returns:
List<Subsystem>of subsystems, sorted bySubsystem.getPreviousSubsystem().
-