|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.svrCore.Name
org.hd.d.pg2k.svrCore.Name.ExhibitFull
public static final class Name.ExhibitFull
ExhibitFullName holds a (ASCII-7) valid syntactically-valid full exhibit name. This will only allow construction of instances representing a valid full exhibit name.
This mainly represents a guarantee that the data is a valid full exhibit name, plus some utility methods/types for conveniently and efficiently accessing components of that name.
The constructors are private and only accessible via factory methods to help with instance control, and all instances are automatically intern()ed to eliminate duplicates.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.hd.d.pg2k.svrCore.Name |
|---|
Name.ExhibitFull, Name.ExhibitShort |
| Field Summary | |
|---|---|
private static long |
serialVersionUID
Unique Serialisation class ID generated by http://random.hd.org/. |
private Name.ExhibitShort |
shortName
Cache of link to parent, lazily computed on demand. |
| Fields inherited from class org.hd.d.pg2k.svrCore.Name |
|---|
CASE_INSENSITIVE_ORDER, EMPTY, prev |
| Constructor Summary | |
|---|---|
private |
Name.ExhibitFull(java.lang.CharSequence name,
Name prev)
|
| Method Summary | |
|---|---|
char |
charAt(int index)
Extract char at specified index. |
int |
compareTo(Name.ExhibitFull o)
Provide natural sort order for this class. |
static Name.ExhibitFull |
create(java.lang.CharSequence fullName)
Create an ExhibitFull instance; never null. |
static Name.ExhibitFull |
create(java.lang.CharSequence fullName,
Name prev)
Create an ExhibitFull instance with an optional previous value to attempt to share a prefix with; never null. |
static Name.ExhibitFull |
createNoIntern(java.lang.CharSequence fullName,
Name prev)
Create an ExhibitFull instance with an optional previous value to attempt to share a prefix with, with no intern()ing; never null. |
Name.ExhibitShort |
getShortName()
Extract strongly-typed ExhibitShortName, ie the filename component; never null. |
Name.ExhibitFull |
getVirtualExhibitName()
Create a "virtual" full name consisting of the category directory and then the file component; never null. |
java.lang.String |
toString()
Convert to String containing same char sequence; never null. |
void |
validateObject()
Validate fields/state. |
| Methods inherited from class org.hd.d.pg2k.svrCore.Name |
|---|
byteAt, byteAtInner, bytesAtInner, compareTo, contentEquals, contentEquals, createOrStringFallback, equals, getBlockCount, getPrefixLen, getPrevChainLength, getSuffixLen, hashCode, length, readResolve, showInternalStructure, subSequence, toByteArray, writeToByteArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.hd.d.pg2k.svrCore.TextUtils.CharSequence8Bit |
|---|
byteAt, toByteArray |
| Methods inherited from interface java.lang.CharSequence |
|---|
length, subSequence |
| Field Detail |
|---|
private transient Name.ExhibitShort shortName
Not serialisable (because recomputable).
private static final long serialVersionUID
| Constructor Detail |
|---|
private Name.ExhibitFull(java.lang.CharSequence name,
Name prev)
| Method Detail |
|---|
public static Name.ExhibitFull create(java.lang.CharSequence fullName)
If passed an ExhibitFull (but not including sub-classes) this returns it untouched.
fullName - the (7-bit) syntactically-valid full exhibit name; never null nor empty
java.lang.IllegalArgumentException - in the case of a null or invalid putative full name
public static Name.ExhibitFull create(java.lang.CharSequence fullName,
Name prev)
If passed an ExhibitFull (but not including sub-classes) this returns it untouched.
fullName - the (7-bit) syntactically-valid full exhibit name; never null nor emptyprev - previous Name with which to attempt to share a prefix; null if none
java.lang.IllegalArgumentException - in the case of a null or invalid putative full name
public static Name.ExhibitFull createNoIntern(java.lang.CharSequence fullName,
Name prev)
This uses minimal cleverness, no intern()ing, no use of prefix/suffix caches, minimal overheads, etc, and so allows generation of completely fresh instances unconnected with any previous ones. This may well not make optimal use of memory, and so is not usually recommended.
fullName - the (7-bit) syntactically-valid full exhibit name; never null nor emptyprev - previous Name with which to attempt to share a prefix; null if none
java.lang.IllegalArgumentException - in the case of a null or invalid putative full namepublic Name.ExhibitShort getShortName()
This guarantees that only one ShortName instance can be generated for each FullName. Thus intern()ing is neither needed nor supported.
public Name.ExhibitFull getVirtualExhibitName()
Returns this instance as-is if already 'virtual'.
public final char charAt(int index)
charAt in interface java.lang.CharSequencecharAt in class Namepublic final int compareTo(Name.ExhibitFull o)
public java.lang.String toString()
toString in interface java.lang.CharSequencetoString in class Name
public void validateObject()
throws java.io.InvalidObjectException
Barf if something bad is found. (Maybe allow some extra info in debug version.)
validateObject in interface java.io.ObjectInputValidationvalidateObject in class Namejava.io.InvalidObjectException
|
DHD Multimedia Gallery V1.60.69 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||