org.beanfabrics.model
Class TextPM.TextComparable

java.lang.Object
  extended by org.beanfabrics.model.TextPM.TextComparable
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
BigDecimalPM.BigDecimalComparable
Enclosing class:
TextPM

protected class TextPM.TextComparable
extends java.lang.Object
implements java.lang.Comparable

The TextPM.TextComparable delegates the comparison to a CollationKey constructed from the PM's text using a Collator.


Constructor Summary
TextPM.TextComparable()
          Constructs a TextPM.TextComparable using the locale-sensitve default Collator.
TextPM.TextComparable(java.text.Collator collator)
          Constructs a TextPM.TextComparable using the given Collator.
 
Method Summary
 int compareTo(java.lang.Object o)
          
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextPM.TextComparable

public TextPM.TextComparable()
Constructs a TextPM.TextComparable using the locale-sensitve default Collator.


TextPM.TextComparable

public TextPM.TextComparable(java.text.Collator collator)
Constructs a TextPM.TextComparable using the given Collator.

Parameters:
collator -
Method Detail

compareTo

public int compareTo(java.lang.Object o)

Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object