org.hd.d.pg2k.webSvr.exhibit
Class BuiltInFilters.sortByName

java.lang.Object
  extended by org.hd.d.pg2k.webSvr.exhibit.BuiltInFilters.sortByName
All Implemented Interfaces:
java.io.Serializable, ExprIF, SortIF
Enclosing class:
BuiltInFilters

public static final class BuiltInFilters.sortByName
extends java.lang.Object
implements SortIF

Simple sort of exhibits by name. By default sorts in natural String order, but can take a Comparator argument to use (eg to use a 'smart' ordering(s) for human benefit).

See Also:
Serialized Form

Field Summary
private static long serialVersionUID
          Unique serial ID.
static java.lang.String SIMPLE
          Simple sort; default String lexical ordering; can use null instead.
static java.lang.String SIMPLE_SMART
          Simple smart sort; essentially case-insensitive ordering on file component.
static java.lang.String SMART
          Full smart sort; gets current version of comparator during sort().
private  java.lang.String sortType
          Sort Comparator; null for default (simple) sort.
 
Constructor Summary
BuiltInFilters.sortByName(java.lang.String sortType)
          Call with argument giving sort type (or null for natural ordering).
BuiltInFilters.sortByName(java.lang.String[] args)
          Call with no args or single argument giving sort type.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Tests equality between two sortByName objects.
 int hashCode()
          The hashcode of the sort, or null for the default sort.
 Name.ExhibitFull[] sort(AllExhibitProperties aep, Name.ExhibitFull[] exhibitNames)
          Sorts the given exhibits (specified by full name) in situ; never null.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Unique serial ID.

See Also:
Constant Field Values

SIMPLE

public static final java.lang.String SIMPLE
Simple sort; default String lexical ordering; can use null instead.

See Also:
Constant Field Values

SIMPLE_SMART

public static final java.lang.String SIMPLE_SMART
Simple smart sort; essentially case-insensitive ordering on file component.

See Also:
Constant Field Values

SMART

public static final java.lang.String SMART
Full smart sort; gets current version of comparator during sort(). This uses the data-dependent sort (dependent on the set of attribute words) that comes with the data so that it is always current.

See Also:
Constant Field Values

sortType

private final java.lang.String sortType
Sort Comparator; null for default (simple) sort.

Constructor Detail

BuiltInFilters.sortByName

public BuiltInFilters.sortByName(java.lang.String sortType)
Call with argument giving sort type (or null for natural ordering). Recognised values are:


BuiltInFilters.sortByName

public BuiltInFilters.sortByName(java.lang.String[] args)
Call with no args or single argument giving sort type. Recognised values are:

Method Detail

sort

public Name.ExhibitFull[] sort(AllExhibitProperties aep,
                               Name.ExhibitFull[] exhibitNames)
Description copied from interface: SortIF
Sorts the given exhibits (specified by full name) in situ; never null.

Specified by:
sort in interface SortIF

hashCode

public int hashCode()
The hashcode of the sort, or null for the default sort.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Tests equality between two sortByName objects. For this to be the case the two comparator objects must be == (eg both be null), or compare equals().

Overrides:
equals in class java.lang.Object

DHD Multimedia Gallery V1.57.21

Copyright (c) 1996-2011, Damon Hart-Davis. All rights reserved.