|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.webSvr.exhibit.Expr
org.hd.d.pg2k.webSvr.exhibit.SortExpr
public final class SortExpr
Wraps a sorter to make an expression (for a FilterBean). Sorters must be Serializable so that expressions can be persisted. They must not attempt to cache any reference, direct or indirect, to a DataSourceBean.
Sorter objects must be immutable and the sort() method must be idempotent.
TODO: do object validation on deserialisation
| Field Summary | |
|---|---|
private static long |
serialVersionUID
Unique Serialisation class ID generated by http://random.hd.org/. |
private SortIF |
sorter
The sort we apply here; never null. |
| Constructor Summary | |
|---|---|
SortExpr(Expr _upstream,
SortIF _sorter)
Construct us with the upstream expression. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Equality depends on underlying expression and this sorter. |
Name.ExhibitFull[] |
eval(AllExhibitProperties aep,
Name.ExhibitFull[] in)
Evaluate this expression applying our sort. |
int |
hashCode()
Hash depends on underlying expression and this sorter. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final SortIF sorter
private static final long serialVersionUID
| Constructor Detail |
|---|
public SortExpr(Expr _upstream,
SortIF _sorter)
| Method Detail |
|---|
public Name.ExhibitFull[] eval(AllExhibitProperties aep,
Name.ExhibitFull[] in)
We return a set of names, possibly empty.
The result array contains no duplicates nor nulls (providing the input is similarly well-behaved) and is never null itself.
Designed to be overridden and have super() called to collect upstream results... By itself returns all the exhibits untouched, ie is a null filter/sorter.
The result may be the input array sorted in place to avoid copying, or may be a new array possibly smaller than the input array; this may perform filtering or other operations that needs to operate on the whole (current) set of exhibits at once.
eval in class Exprpublic int hashCode()
hashCode in class Exprpublic boolean equals(java.lang.Object obj)
equals in class Expr
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||