User:Alexsmail/Computer programming/How Objects should be correctly compared in Java
Introduction edit
See appendix A for formal definition.
Method along consideration edit
equals() edit
Object hirerachy and its state (getClass() or instanceof ?). Immutable object. Object.equals()
hashCode() edit
Natural order - compareTo() edit
compareTo() edit
Map (Hashtable) edit
Combination consideration edit
equals() and hashCode() edit
equals() and compareTo() edit
equals() and compareTo() and hashCode() edit
HashMap, equals() and compareTo() edit
TreeMap, equals() and compareTo() edit
Maps, Hashtable and Set and Arrays edit
HashMap's and Set's key edit
Immutable. keys are Uniformly distributed.
TreeMap vs HashMap edit
Sort edit
QuickSort MergeSort Stable sort Comparator TreeMap
Miscellaneous edit
signum function edit
Sorting with Comparator edit
Appendix B edit
Mathematic background edit
Set Order pair Relation Relation over Set Two-place relation function function in Java Partial Order Full order Equivalence relation Equivalence class