standup.symbol
Class SymbolFilenameComparator

java.lang.Object
  extended by standup.symbol.SymbolFilenameComparator
All Implemented Interfaces:
Comparator<String>

public class SymbolFilenameComparator
extends Object
implements Comparator<String>

A Comparator<String> used to determine the order of preference of symbol filenames given the user's preference for symbol sets.

It must be initialized with the user's preference as returned by, for example, standup.clouds.OptionsCloudFrontend#getSymbolSet(). Should this value change, make sure to instantiate a new SymbolFilenameComparator.

Author:
Ruli Manurung

Field Summary
private  boolean preferRebus
           
 
Constructor Summary
SymbolFilenameComparator(SymbolType[] symbolSetPreference)
          Constructor that provides the preference for symbol sets.
 
Method Summary
 int compare(String o1, String o2)
          This definition is consistent with equals.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

preferRebus

private final boolean preferRebus
Constructor Detail

SymbolFilenameComparator

public SymbolFilenameComparator(SymbolType[] symbolSetPreference)
Constructor that provides the preference for symbol sets.

Parameters:
symbolSetPreference -
Method Detail

compare

public int compare(String o1,
                   String o2)
This definition is consistent with equals.

Specified by:
compare in interface Comparator<String>