org.hd.d.pg2k.svrCore
Class ExhibitAttrUtils.ExhibitAttrWords.SubjOrderComp

java.lang.Object
  extended by org.hd.d.pg2k.svrCore.ExhibitAttrUtils.ExhibitAttrWords.SubjOrderComp
All Implemented Interfaces:
java.util.Comparator<Name.ExhibitFull>
Enclosing class:
ExhibitAttrUtils.ExhibitAttrWords

private static final class ExhibitAttrUtils.ExhibitAttrWords.SubjOrderComp
extends java.lang.Object
implements java.util.Comparator<Name.ExhibitFull>

Class to implement our "subject" order Comparator. TODO: cache of intern()ed main words component (or sets of items with identical main words) to speed up searching in large blocks with same main words


Field Summary
private  java.util.Set<java.lang.String> attrWordsSortedSet
          The set of valid attribute/discardable words; not null.
 
Constructor Summary
ExhibitAttrUtils.ExhibitAttrWords.SubjOrderComp(java.util.Set<java.lang.String> attrWordsSortedSet)
           
 
Method Summary
 int compare(Name.ExhibitFull s1, Name.ExhibitFull s2)
           
 
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

attrWordsSortedSet

private final java.util.Set<java.lang.String> attrWordsSortedSet
The set of valid attribute/discardable words; not null.

Constructor Detail

ExhibitAttrUtils.ExhibitAttrWords.SubjOrderComp

ExhibitAttrUtils.ExhibitAttrWords.SubjOrderComp(java.util.Set<java.lang.String> attrWordsSortedSet)
Method Detail

compare

public final int compare(Name.ExhibitFull s1,
                         Name.ExhibitFull s2)
Specified by:
compare in interface java.util.Comparator<Name.ExhibitFull>

DHD Multimedia Gallery V1.60.69

Copyright (c) 1996-2012, Damon Hart-Davis. All rights reserved.