Sydney

Class ViewerSorter

Object
   |
   +--ViewerSorter

class ViewerSorter

Defined in viewer_sorter.js


Constructor Summary
ViewerSorter (comparator)
           
 
Method Summary
 int getIndexOf(<Object> newChild, <ArrayList> existingChildren)
           Calculates the insertion point of a new object given a list of existing objects.
 void invert()
           Inverts the current sort order.
 boolean isInverted()
           Returns true if the current sort order is the same as when the sorter was constructed, and false if the current sort order is inverted as compared to construct-time sort order.
 void setInverted(<boolean> inverted)
           Sets the inverted state to inverted.
 void sort(<ArrayList> children)
           Sorts the given list of objects in place.
<static> function NUM_COMP(<number> numA, <number> numB)
           A comparator for numbers (either ints or floats), suitable for passing to a ViewerSorter.
<static> int STR_COMP(<string> strA, <string> strB)
           A comparator for strings, suitable for passing to a ViewerSorter.
<static> Function getChainedComparator()
           Returns a comparator suitable for passing to a ViewerSorter that compares two values based on a sequence of prioritized keys.
<static> Function getCompositeComparator(<string> path, <boolean> ignoreCase)
           Returns a comparator suitable for passing to a ViewerSorter that will do a string comparison on two Composites at the given path.

Constructor Detail

ViewerSorter

function ViewerSorter(comparator)
Method Detail

getIndexOf

int getIndexOf(<Object> newChild, <ArrayList> existingChildren)

invert

void invert()

isInverted

boolean isInverted()

setInverted

void setInverted(<boolean> inverted)

sort

void sort(<ArrayList> children)

NUM_COMP

<static> function NUM_COMP(<number> numA, <number> numB)

STR_COMP

<static> int STR_COMP(<string> strA, <string> strB)

getChainedComparator

<static> Function getChainedComparator()

getCompositeComparator

<static> Function getCompositeComparator(<string> path, <boolean> ignoreCase)

Sydney

SourceForge.net Logo