wt.part
Class PartStructureNumberComparator

java.lang.Object
  extended bywt.part.PartStructureNumberComparator
All Implemented Interfaces:
Comparator

public class PartStructureNumberComparator
extends Object
implements Comparator

This Comparator can be used to compare the Number attribute of WTParts and/or WTPartMasters, using a Locale-specific instance of a Collator.

Supported API: true

Extendable: false


Field Summary
private  Locale locale
           
 
Constructor Summary
PartStructureNumberComparator(Locale locale)
          This constructor needs a Locale to construct a locale-specific Collator to use in comparing the Number attributes.
 
Method Summary
 int compare(Object o1, Object o2)
          Compares the Number attribute of item 1 of each array, which should be either contain a WTPart or a WTPartMaster, using a Locale-specific instance of a Collator, using the getString method to extract the Number from either type of object.
protected  String getString(Object obj)
          Extracts the Number attribute of WTParts and/or WTPartMasters.
 
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
 

Field Detail

locale

private Locale locale
Constructor Detail

PartStructureNumberComparator

public PartStructureNumberComparator(Locale locale)
This constructor needs a Locale to construct a locale-specific Collator to use in comparing the Number attributes.

Supported API: true

Extendable: false

Method Detail

compare

public int compare(Object o1,
                   Object o2)
Compares the Number attribute of item 1 of each array, which should be either contain a WTPart or a WTPartMaster, using a Locale-specific instance of a Collator, using the getString method to extract the Number from either type of object.

Supported API: true

Extendable: false

Specified by:
compare in interface Comparator

getString

protected String getString(Object obj)
Extracts the Number attribute of WTParts and/or WTPartMasters.

Supported API: true

Extendable: false