| 
What this is
 Other links
 The source code
package p;
import java.math.BigDecimal;
import java.util.SortedMap;
import java.util.TreeMap;
import java.util.Vector;
class A {
	private SortedMap fillSortedMap(Vector values, boolean byValue) {
		TreeMap map= new TreeMap();
		for (int i= 0; i < values.size(); i += 2) {
			Object valueOnIndexI= values.get(i);
			if (byValue) {
				map.put(
					values.get(i + 1),
					new Integer(((BigDecimal) valueOnIndexI).intValue()));
			} else {
				map.put(
					new Integer(((BigDecimal) valueOnIndexI).intValue()),
					values.get(i + 1));
			}
		}
		return map;
	}
}
 | 
| ... this post is sponsored by my books ... | |
         
           #1 New Release!  | 
      
         
           FP Best Seller  | 
  
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse 
URI on this website is
paid back to open source projects.