|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.svrCore.ExhibitStaticAttr
public final class ExhibitStaticAttr
Immutable, Serializable collection of the basic static attributes of an exhibit. This is designed to be fast to do comparisons against, and to be transportable across a network, persistable to disc, and easy to run filtering queries against.
This verifies that its contents make sense at construction and after deserialisation.
This is keyed on the exhibit underlying name, but should be easy to use with other comparators.
The timestamp can be used to compare that the version of the object held is up-to-date.
Some core values are made available as public final fields for speed of access.
| Field Summary | |
|---|---|
private static boolean |
ALWAYS_USE_EFP
True if always EFP is always used as the normal internal form. |
private java.lang.CharSequence |
filePath
The full (relative) path/name of the exhibit; never null. |
long |
length
The length of the exhibit in bytes; strictly positive. |
private static long |
serialVersionUID
My initial version number. |
long |
timestamp
The Java-style timestamp (last-modified-time) of the exhibit (ms); strictly positive. |
| Constructor Summary | |
|---|---|
private |
ExhibitStaticAttr(java.lang.CharSequence _filePath)
Used by makeNameOnlyKey() to make a name-only key efficiently. |
|
ExhibitStaticAttr(java.lang.CharSequence _filePath,
long _length,
long _timestamp)
Construct new immutable instance. |
| Method Summary | |
|---|---|
int |
compareTo(ExhibitStaticAttr o)
All comparison is done on the exhibit name alone. |
boolean |
equals(java.lang.Object o)
All comparison is done on the name only, NOT on all fields. |
java.lang.CharSequence |
getCharSequence()
Get the file path (full exhibit name) as an immutable CharSequence; never null. |
Name.ExhibitFull |
getExhibitFullName()
Get the full exhibit name; never null. |
java.lang.String |
getFilePath()
Deprecated. getExhibitFullName() or getCharSequence() preferred |
java.lang.Comparable<?> |
getKey()
Extract compound key that does depend on all the fields; never null. |
int |
hashCode()
All comparison is done on the name. |
private boolean |
isEFP()
Returns true iff the run-time type of filePath is an ExhibitFullName. |
boolean |
isIdentical(ExhibitStaticAttr other)
Tests that instances are identical in all parameters. |
static ExhibitStaticAttr |
makeNameOnlyKey(java.lang.CharSequence filePath)
Generate a lookup key with just the name significant; never null. |
protected java.lang.Object |
readResolve()
Deserialise: use constructor for validation, defensive copying, etc. |
java.lang.String |
toString()
Human-readable summary contains at least the name. |
void |
validateObject()
Validate fields/state. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final java.lang.CharSequence filePath
The field type is CharSequence to allow reading in of old String-valued instances but allows holding of ExhibitFileName instances at run-time.
All run-time instances will have the same type, except possibly fleetingly during (de)serialisation.
public final long length
public final long timestamp
private static final boolean ALWAYS_USE_EFP
private static final long serialVersionUID
| Constructor Detail |
|---|
public ExhibitStaticAttr(java.lang.CharSequence _filePath,
long _length,
long _timestamp)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException - in the case of a null or invalid filePathprivate ExhibitStaticAttr(java.lang.CharSequence _filePath)
java.lang.IllegalArgumentException - in the case of a null or invalid filePath| Method Detail |
|---|
public final int hashCode()
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object o)
equals in class java.lang.Objectprivate boolean isEFP()
@Deprecated public java.lang.String getFilePath()
public Name.ExhibitFull getExhibitFullName()
public java.lang.CharSequence getCharSequence()
public java.lang.String toString()
toString in class java.lang.Objectpublic final int compareTo(ExhibitStaticAttr o)
compareTo in interface java.lang.Comparable<ExhibitStaticAttr>public final boolean isIdentical(ExhibitStaticAttr other)
public java.lang.Comparable<?> getKey()
public static ExhibitStaticAttr makeNameOnlyKey(java.lang.CharSequence filePath)
java.lang.IllegalArgumentException - in the case of a null or invalid filePathprotected java.lang.Object readResolve()
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.ObjectInputValidationjava.io.InvalidObjectException
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||