|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| StringLengthComparator.java | - | 100% | 100% | 100% |
|
||||||||||||||
| 1 | package com.agical.rdoc.util; | |
| 2 | ||
| 3 | import java.util.Comparator; | |
| 4 | ||
| 5 | ||
| 6 | /** | |
| 7 | * @author brolund | |
| 8 | * | |
| 9 | * (c) 2005 Agical AB | |
| 10 | */ | |
| 11 | public class StringLengthComparator implements Comparator { | |
| 12 | ||
| 13 | 4 | public StringLengthComparator() { |
| 14 | } | |
| 15 | ||
| 16 | 5 | public int compare(Object o1, Object o2) { |
| 17 | 5 | return o1.toString().length()-o2.toString().length(); |
| 18 | } | |
| 19 | } |
|
||||||||||