|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.svrCore.ExhibitAttrUtils.ExhibitAttrWords
public static final class ExhibitAttrUtils.ExhibitAttrWords
This class contains exhibit attribute words. This data is derived from global config data.
| Nested Class Summary | |
|---|---|
private static class |
ExhibitAttrUtils.ExhibitAttrWords.IndirectComparatorStub
Device to allow serialisation of trivial stubs and do proper quality test. |
private static class |
ExhibitAttrUtils.ExhibitAttrWords.SmartOrderComp
Class to implement our "smart" order Comparator. |
private static class |
ExhibitAttrUtils.ExhibitAttrWords.SubjOrderComp
Class to implement our "subject" order Comparator. |
| Field Summary | |
|---|---|
private java.util.Comparator<java.lang.String> |
_SMART_ORDER
Internal copy of SMART_ORDER; not serialised. |
private java.util.Comparator<java.lang.String> |
_SUBJECT_ORDER
Internal copy of SUBJECT_ORDER; not serialised. |
private java.lang.String[] |
attrWords
The sorted and duplicate-free list of attribute words. |
private java.util.SortedSet<java.lang.String> |
attrWordsSortedSet
The immutable sorted set of attribute words. |
long |
longHash
The hash of all the data held; guaranteed non-negative. |
private static long |
serialVersionUID
Our serial version... |
java.util.Comparator<java.lang.String> |
SMART_ORDER
A Comparator that sorts exhibits by name taking account of attribute words. |
java.util.Comparator<java.lang.String> |
SUBJECT_ORDER
A Comparator that sorts exhibits by name comparing as equal those that differ only in attribute words. |
| Constructor Summary | |
|---|---|
private |
ExhibitAttrUtils.ExhibitAttrWords(java.lang.String[] attributeWords)
Construct a set of global (immutable) properties. |
| Method Summary | |
|---|---|
private void |
_setComparators(java.util.Set<java.lang.String> attrWordsSortedSet)
Routine to set _SUBJECT_ORDER and _SMART_ORDER. |
private long |
computeHash()
Compute a hash over all the data in the object; guaranteed non-negative. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one; the underlying data is the same if true. |
java.lang.String[] |
getAttrWords()
The sorted and duplicate-free non-null list of attribute words. |
java.util.SortedSet<java.lang.String> |
getAttrWordsSortedSet()
The set of attribute words as a view in an immutable SortedSet. |
int |
hashCode()
Returns a hash code value for the object; derived from the longHash. |
private void |
readObject(java.io.ObjectInputStream in)
Deserialise. |
void |
validateObject()
Validate fields/state. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final long longHash
private java.lang.String[] attrWords
We are careful never to share a reference to this outside the class, eg upon deserialisation.
This is the primary store of attribute words information.
private transient java.util.SortedSet<java.lang.String> attrWordsSortedSet
private transient java.util.Comparator<java.lang.String> _SUBJECT_ORDER
private transient java.util.Comparator<java.lang.String> _SMART_ORDER
public final java.util.Comparator<java.lang.String> SUBJECT_ORDER
public final java.util.Comparator<java.lang.String> SMART_ORDER
equals() is true iff referring underlying comparator's backing AEP has an unchanged longHash.
private static final long serialVersionUID
| Constructor Detail |
|---|
private ExhibitAttrUtils.ExhibitAttrWords(java.lang.String[] attributeWords)
attributeWords - set of attribute words for exhibit names;
need not be sorted,
may be null or zero length,
but should not contain any zero-length words
nor words consisting purely of digits
nor that contain anything other than digits or lower-case letters| Method Detail |
|---|
public java.lang.String[] getAttrWords()
Creating the return value may be expensive, requiring extensive copying.
public java.util.SortedSet<java.lang.String> getAttrWordsSortedSet()
Preparing this return value should take a constant, small, time.
private void _setComparators(java.util.Set<java.lang.String> attrWordsSortedSet)
private long computeHash()
public int hashCode()
hashCode in class java.lang.ObjectObject.equals(Object),
Hashtablepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.Boolean.hashCode(),
Hashtable
public void validateObject()
throws java.io.InvalidObjectException
Barf if something bad is found. (Maybe allow some extra info in debug version.)
java.io.InvalidObjectException
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
|
DHD Multimedia Gallery V1.50.55 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||