Class InstanceRefTemplateComparator
- java.lang.Object
-
- de.aristaflow.adept2.model.processmodel.tools.InstanceRefTemplateComparator
-
- All Implemented Interfaces:
SerialisableComparator<InstanceReference>
,Serializable
,Comparator<InstanceReference>
public class InstanceRefTemplateComparator extends Object implements SerialisableComparator<InstanceReference>
This comparator comparesInstanceReference
s by the corresponding template IDs (by delegating to anTemplateReferenceComparator
). If the template IDs are equal, the instance ID will be used. Note: this comparator imposes orderings that are inconsistent with equals.- Author:
- Ulrich Kreher
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected TemplateReferenceComparator
trc
The template reference comparator to delegate to.protected SerialisableComparator<UUID>
uuidComparator
The comparator comparing UUIDs unsigned, that is a leading 8 is less than a leading 7.
-
Constructor Summary
Constructors Constructor Description InstanceRefTemplateComparator()
Creates a newInstanceRefTemplateComparator
having a template reference comparator and a UUID comparator to delegate to.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(InstanceReference i1, InstanceReference i2)
-
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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
trc
protected final TemplateReferenceComparator trc
The template reference comparator to delegate to.
-
uuidComparator
protected final SerialisableComparator<UUID> uuidComparator
The comparator comparing UUIDs unsigned, that is a leading 8 is less than a leading 7.
-
-
Method Detail
-
compare
public int compare(InstanceReference i1, InstanceReference i2)
- Specified by:
compare
in interfaceComparator<InstanceReference>
-
-