ProgramixGenericLib v5.0.1

com.programix.collections
Class GeneralStringComparator.LengthTreatment

java.lang.Object
  extended by com.programix.collections.GeneralStringComparator.LengthTreatment
Enclosing class:
GeneralStringComparator

public static final class GeneralStringComparator.LengthTreatment
extends Object

Defines how the length of the string should be considered when being compared to other String's.

Author:
Paul Hyde

Field Summary
static GeneralStringComparator.LengthTreatment LONGEST_FIRST
          The longest String's should come first.
static GeneralStringComparator.LengthTreatment NONE
          Nothing about the length of the String should be given special consideration.
static GeneralStringComparator.LengthTreatment SHORTEST_FIRST
          The shortest String's should come first.
 
Method Summary
 boolean equals(Object obj)
          Use this method instead of == to be sure that serialization or multiple class loaders have not resulted in multiple instances.
 String getName()
           
static GeneralStringComparator.LengthTreatment[] getValues()
          Returns an array of all the legal values.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final GeneralStringComparator.LengthTreatment NONE
Nothing about the length of the String should be given special consideration.


SHORTEST_FIRST

public static final GeneralStringComparator.LengthTreatment SHORTEST_FIRST
The shortest String's should come first. Any additional sorting would happen within that length group (all the strings with a length of 4 would be sorted together, etc.).


LONGEST_FIRST

public static final GeneralStringComparator.LengthTreatment LONGEST_FIRST
The longest String's should come first. Any additional sorting would happen within that length group (all the strings with a length of 4 would be sorted together, etc.).

Method Detail

getName

public String getName()

equals

public boolean equals(Object obj)
Use this method instead of == to be sure that serialization or multiple class loaders have not resulted in multiple instances.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getValues

public static GeneralStringComparator.LengthTreatment[] getValues()
Returns an array of all the legal values. A cloned copy is returned, so no caution is required.


ProgramixGenericLib v5.0.1

Copyright © 2001-2009 Programix Incorporated. All rights reserved. ProgramixGenericLib is free and is OSI Certified Open Source Software under the BSD license.