private Map<String, OwnerVO> getSortedMapByOwnerTotChgVol(Map<String, OwnerVO> ownerMap) {
List<Map.Entry<String, OwnerVO>> sortList = new LinkedList<>(ownerMap.entrySet());
Collections.sort(sortList, new Comparator<Map.Entry<String, OwnerVO>>() {
@Override
public int compare(Entry<String, OwnerVO> o1, Entry<String, OwnerVO> o2) {
return ((o1.getValue().getTotChgVol() - o2.getValue().getTotChgVol()) < 0 ? 1 : -1);
}
});
Map<String, OwnerVO> sortedMap = new LinkedHashMap<>();
Iterator<Map.Entry<String, OwnerVO>> iter = sortList.iterator();
while(iter.hasNext()) {
Map.Entry<String, OwnerVO> e = iter.next();
sortedMap.put(e.getKey(), e.getValue());
}
return sortedMap;
}