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

java.lang.Object
  extended by org.hd.d.pg2k.svrCore.ExhibitAttrUtils.ExhibitAttrWords.IndirectComparatorStub
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator<java.lang.String>
Enclosing class:
ExhibitAttrUtils.ExhibitAttrWords

private abstract static class ExhibitAttrUtils.ExhibitAttrWords.IndirectComparatorStub
extends java.lang.Object
implements java.io.Serializable, java.util.Comparator<java.lang.String>

Device to allow serialisation of trivial stubs and do proper quality test. This allows serialisation to take place, and also allows equals() to be implemented by comparing the implementation class and the underlying longHash.


Field Summary
private  int hash
          Local version of main hash.
private static long serialVersionUID
          Give this a fixed ID.
 
Constructor Summary
ExhibitAttrUtils.ExhibitAttrWords.IndirectComparatorStub(long longHash)
          Construct an instance with the hash embedded.
 
Method Summary
 int compare(java.lang.String ex1, java.lang.String ex2)
          Apply the underlying Comparator
 boolean equals(java.lang.Object obj)
          Is comparator equal (ie has some data changed)?
protected abstract  java.util.Comparator<java.lang.String> getComp()
          Get the comparator that we indirectly call.
 int hashCode()
          Compute a condensed version of the main hash.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hash

private final int hash
Local version of main hash.


serialVersionUID

private static final long serialVersionUID
Give this a fixed ID.

See Also:
Constant Field Values
Constructor Detail

ExhibitAttrUtils.ExhibitAttrWords.IndirectComparatorStub

ExhibitAttrUtils.ExhibitAttrWords.IndirectComparatorStub(long longHash)
Construct an instance with the hash embedded.

Method Detail

getComp

protected abstract java.util.Comparator<java.lang.String> getComp()
Get the comparator that we indirectly call.


compare

public final int compare(java.lang.String ex1,
                         java.lang.String ex2)
Apply the underlying Comparator

Specified by:
compare in interface java.util.Comparator<java.lang.String>

hashCode

public int hashCode()
Compute a condensed version of the main hash.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Is comparator equal (ie has some data changed)?

Specified by:
equals in interface java.util.Comparator<java.lang.String>
Overrides:
equals in class java.lang.Object

DHD Multimedia Gallery V1.50.55

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