|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.svrCore.Name.CSWrapper<Name.ExhibitFull>
org.hd.d.pg2k.svrCore.Name.ExhibitShort
public static final class Name.ExhibitShort
ExhibitShortName immutable CharSequence light-weight wrapper around underlying ExhibitFullName data. Though slow, these can be used as Map/Set/etc elements, as they have a working (though inefficient) consistent hashCode() and equals(), but it is much preferred (more efficient/fast) to use ExhibitFull as a key.
| Field Summary | |
|---|---|
static char |
PERSISTABLE_NAME_LEADING_CHAR
Unique leading printable-ASCII character for persistableKey(), not a valid exhibit name char. |
static char |
PERSISTABLE_NAME_LENGTH
Length of persistable key in chars; strictly positive. |
| Fields inherited from class org.hd.d.pg2k.svrCore.Name.CSWrapper |
|---|
end, start, underlying |
| Constructor Summary | |
|---|---|
private |
Name.ExhibitShort(Name.ExhibitFull underlying,
int start,
int end)
Create an instance. |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Equality checks for the same type and content. |
Name.ExhibitFull |
getFullName()
Retrieve full name for this short name; never null. |
TextUtils.CharSequence8Bit |
getMainWordsComponent(java.util.Set<java.lang.String> allAttrWords)
Extract the main words (stem) component; never null nor empty. |
int |
hashCode()
The hash code is based on a fixed-time sampling of the content for speed. |
java.lang.CharSequence |
persistableKey()
Persistable unique printable-ASCII immutable CharSequence key; never null. |
java.lang.String |
toString()
Convert to String containing same char sequence. |
| Methods inherited from class org.hd.d.pg2k.svrCore.Name.CSWrapper |
|---|
charAt, compareTo, length, subSequence, toByteArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final char PERSISTABLE_NAME_LEADING_CHAR
public static final char PERSISTABLE_NAME_LENGTH
| Constructor Detail |
|---|
private Name.ExhibitShort(Name.ExhibitFull underlying,
int start,
int end)
| Method Detail |
|---|
public Name.ExhibitFull getFullName()
public TextUtils.CharSequence8Bit getMainWordsComponent(java.util.Set<java.lang.String> allAttrWords)
The result is intern()able to help conflate identical values if required, ie has a working hashCode() and equals(), which may save space and accelerate searching for example.
allAttrWords - a Set of all legal attribute words (String values);
may be empty but not nullpublic boolean equals(java.lang.Object obj)
equals in class Name.CSWrapper<Name.ExhibitFull>public int hashCode()
hashCode in class Name.CSWrapper<Name.ExhibitFull>public java.lang.String toString()
toString in interface java.lang.CharSequencetoString in class Name.CSWrapper<Name.ExhibitFull>public java.lang.CharSequence persistableKey()
This may be slow to compute.
|
DHD Multimedia Gallery V1.53.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||