Class PartStructureLineNumberComparator
java.lang.Object
com.ptc.windchill.enterprise.part.structure.PartStructureLineNumberComparator
- All Implemented Interfaces:
Comparator
This Comparator can be used to compare the Line Number attribute of item 1 of an array,
which should be a
Supported API: true
Extendable: false
WTPartUsageLink,
delegating the comparison to a sub-Comparator if neither object has a Line Number.
Note that using this Comparator in a sort will result in all items without Line Numbers
coming at the end.
Supported API: true
Extendable: false
-
Constructor Summary
ConstructorsConstructorDescriptionPartStructureLineNumberComparator(Comparator subComparator) This constructor needs a subComparator to delegate the comparison to when it cannot perform the comparison itself. -
Method Summary
Modifier and TypeMethodDescriptionintCompares the value of the Line Number attribute ofs using theinvalid reference
wt.part.WTPartUsageLinksgetLineNumber(java.lang.Object)method to extract the Line Numbers from the link objects and delegating the comparison to the sub-Comparator if neither object has a Line Number.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
-
PartStructureLineNumberComparator
This constructor needs a subComparator to delegate the comparison to when it cannot perform the comparison itself. For instance when neither has aLineNumberthen the sub-Comparator, which might just compare based on Name or Number of the part, would be used.
Supported API: true
Extendable: false
-
-
Method Details
-
compare
Compares the value of the Line Number attribute ofs using theinvalid reference
wt.part.WTPartUsageLinksgetLineNumber(java.lang.Object)method to extract the Line Numbers from the link objects and delegating the comparison to the sub-Comparator if neither object has a Line Number.
Supported API: true
Extendable: false- Specified by:
comparein interfaceComparator
-