|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.svrCore.props.GenProps.ClassifiedAd
public static final class GenProps.ClassifiedAd
Class holding details of one classified advertisement; immutable, serialisable. We assume that the on-the-wire format for members is reasonably efficient, especially if the transport layer includes compression such as ZIP.
| Field Summary | |
|---|---|
java.lang.String |
code
HTML code as 7-bit ASCII; non-null, non-zero length. |
java.lang.String |
countries
Country code; comma-separated list of lower-case ccTLD codes or null if none. |
long |
end
Start time (+ve UTC ms greater than 'start') or zero if no end time. |
java.lang.String |
lang
Language/locale filter; two-letter lower-case language code or null if none. |
static int |
MAX_AD_CHARACTERS
Maximum HTML code length in bytes/characters, as per SimpleAs; strictly positive. |
private java.util.regex.Pattern |
pattern
Private cache of compiled regex; null until first use. |
java.lang.String |
regex
Valid case-sensitive regular expression to match a substring of a URI path, never null nor empty. |
private static long |
serialVersionUID
Unique serialisation UID. |
long |
start
Start time (+ve UTC ms) or zero if no start time. |
| Constructor Summary | |
|---|---|
GenProps.ClassifiedAd(java.lang.String HTMLCode,
java.lang.String URIregex,
long start,
long end,
java.lang.String language,
java.lang.String ccTLDs)
Construct new classified ad details. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Equality depends on all fields. |
java.util.regex.Pattern |
getPattern()
Get compiled regex; never null. |
int |
hashCode()
Hash depends on the regex and the end date as good/quick sources of variability. |
protected java.lang.Object |
readResolve()
Deserialise: validate and eliminate duplicates coming off the wire. |
void |
validateObject()
Validate fields/state. |
boolean |
wrongCountry(GeoUtils.CCTLD visitorCcTLD)
Returns true if the supplied (visitor's) country is inappropriate for this ad. |
boolean |
wrongLanguage(java.util.Locale visitorLocale)
Returns true if the supplied (visitor's) locale is inappropriate for this ad. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final java.lang.String regex
private transient volatile java.util.regex.Pattern pattern
Never set null once non-null.
Marked volatile for thread-safe lock-free access,
public final java.lang.String code
public static final int MAX_AD_CHARACTERS
public final long start
public final long end
public final java.lang.String lang
public final java.lang.String countries
private static final long serialVersionUID
| Constructor Detail |
|---|
public GenProps.ClassifiedAd(java.lang.String HTMLCode,
java.lang.String URIregex,
long start,
long end,
java.lang.String language,
java.lang.String ccTLDs)
HTMLCode - HTML code as 7-bit ASCII; non-null, non-zero lengthURIregex - valid regular expression to match a substring of a URI path;
never null nor empty| Method Detail |
|---|
public java.util.regex.Pattern getPattern()
public boolean wrongLanguage(java.util.Locale visitorLocale)
public boolean wrongCountry(GeoUtils.CCTLD visitorCcTLD)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
public void validateObject()
throws java.io.InvalidObjectException
validateObject in interface java.io.ObjectInputValidationjava.io.InvalidObjectExceptionprotected java.lang.Object readResolve()
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||