⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 geodatautils.java

📁 geotools的源码
💻 JAVA
字号:
/*
 * GeoDataUtils.java
 *
 * Created on March 28, 2001, 3:11 PM
 */

package uk.ac.leeds.ccg.geotools;
import com.sun.java.util.collections.ArrayList;
import com.sun.java.util.collections.Comparator;
import com.sun.java.util.collections.Collections;
/**
 *
 * @author  jamesm
 * @version 
 */
public class GeoDataUtils {

    /** Creates new GeoDataUtils */
    public GeoDataUtils() {
    }

    public static ArrayList sort(GeoData target) {
        class doubleComp implements Comparator{
            public int compare(Object a,Object b){
		if(((Double)a).doubleValue()<((Double)b).doubleValue())return -1;
		if(((Double)a).doubleValue()>((Double)b).doubleValue())return 1;
		return 0;
            }
        }
        ArrayList list = new ArrayList();
	java.util.Enumeration ids = target.getIds();
	while(ids.hasMoreElements()){
	    list.add(new Double(target.getValue(((Integer)ids.nextElement()).intValue())));
	}
	Collections.sort(list,new doubleComp());
	return list;
    }
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -