public int compare(WordTracker.WordStats wordStats, WordTracker.WordStats wordStats2)
 {
     if (WordTracker.WordStats.access_000(wordStats) > WordTracker.WordStats.access_000(wordStats2))
     {
         return(-1);
     }
     if (WordTracker.WordStats.access_000(wordStats) == WordTracker.WordStats.access_000(wordStats2))
     {
         return(0);
     }
     return(1);
 }
Пример #2
0
        public virtual void add(Token t)
        {
            this.stateCount++;
            WordSequence wordSequence = this.getWordSequence(t);

            WordTracker.WordStats wordStats = (WordTracker.WordStats) this.statMap.get(wordSequence);
            if (wordStats == null)
            {
                wordStats = new WordTracker.WordStats(wordSequence);
                this.statMap.put(wordSequence, wordStats);
            }
            wordStats.update(t);
        }
Пример #3
0
        public virtual void dump()
        {
            this.dumpSummary();
            ArrayList arrayList = new ArrayList(this.statMap.values());

            Collections.sort(arrayList, WordTracker.WordStats.COMPARATOR);
            Iterator iterator = arrayList.iterator();

            while (iterator.hasNext())
            {
                WordTracker.WordStats wordStats = (WordTracker.WordStats)iterator.next();
                [email protected](new StringBuilder().append("   ").append(wordStats).toString());
            }
        }
Пример #4
0
 internal static float access_000(WordTracker.WordStats wordStats)
 {
     return(wordStats.maxScore);
 }