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

📄 codatype.java

📁 一个用java写的地震分析软件(无源码)
💻 JAVA
字号:
package org.trinet.jasi.coda;
/** Type of coda ('P', 'S', etc.) */
public class CodaType {
    public final static CodaType P = new CodaType(1, "P");
    public final static CodaType S = new CodaType(2, "S");

    private int id;
    private String type;

    private CodaType(int id, String type) {
        this.id = id;
        this.type = type;
    }

    int getId() { return id;}

    String getName() { return type;}

    public static CodaType getCodaType(int id) {
        if (id == 1) return P;
        if (id == 2) return S;
        return null;
    }
    public static CodaType getCodaType(String typeName) {
        if (typeName.equalsIgnoreCase("S")) return S;
        if (typeName.equalsIgnoreCase("P")) return P;
        return null;
    }

    public String toString() {
        return String.valueOf(id) + " " + type;
    }
}

⌨️ 快捷键说明

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