org.scalabench.plugins.dacapo.util
Class SizeNameComparator

java.lang.Object
  extended by org.scalabench.plugins.dacapo.util.SizeNameComparator
All Implemented Interfaces:
Comparator<String>

public final class SizeNameComparator
extends Object
implements Comparator<String>

A comparator which treats the following strings, commonly used as the names of input sizes, specially.

  1. tiny
  2. small
  3. default
  4. large
  5. huge
  6. gargantuan
  7. colossal
All other strings are sorted beyond them.


Constructor Summary
SizeNameComparator()
           
 
Method Summary
 int compare(String lhs, String rhs)
           
 boolean equals(Object other)
          Any two instances of SizeNameComparator are equal, as this class is a state-less function object.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SizeNameComparator

public SizeNameComparator()
Method Detail

compare

public int compare(String lhs,
                   String rhs)
Specified by:
compare in interface Comparator<String>

equals

public boolean equals(Object other)
Any two instances of SizeNameComparator are equal, as this class is a state-less function object.

Specified by:
equals in interface Comparator<String>
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2010-2012 Technische Universität Darmstadt. All Rights Reserved.