Package lipstone.joshua.parser.util

Examples of lipstone.joshua.parser.util.LengthComparison


 
  /**
   * Sorts this set by length
   */
  public void sortByLength() {
    Collections.sort(set, new LengthComparison());
  }
View Full Code Here


    this.parser = parser;
    this.nl = nl;
    units = new HashMap<String, Unit>();
    prefixes = new HashMap<String, BigDec>();
    abbreviatedPrefixes = new HashMap<String, String>();
    unitAbbreviations = new TreeMap<String, String>(new LengthComparison());
    allUnits = new SortedList<String>(new LengthComparison());
   
    //I know, but it is slightly faster than using an array and iterating through while converting to BigDec
    prefixes.put("yocto", new BigDec(-8));
    prefixes.put("zepto", new BigDec(-7));
    prefixes.put("atto", new BigDec(-6));
View Full Code Here

    postProcessFilters = new ArrayList<OutputFilterPlugin>();
    settingsPlugins = new ArrayList<SettingsPlugin>();
    keywords = new TreeMap<String, Keyword>(new TreeMapSorter());
    commands = new TreeMap<String, Command>(new TreeMapSorter());
    plugins = new ArrayList<ParserPlugin>();
    allNames = new SortedList<String>(new LengthComparison());
    abbreviations = new HashMap<String, String>();
  }
View Full Code Here

TOP

Related Classes of lipstone.joshua.parser.util.LengthComparison

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.