コード例 #1
0
    public long getPop(int key)
    {
        switch (key)
        {
        case 1:
            return(MigrationFramework.getFrPop());

        case 2:
            return(MigrationFramework.getUsPop());

        default:
            return(-1);
        }
    }
コード例 #2
0
    private void updateAllData()
    {
        currentYearText.text = "Current Year: " + currentYear;
        frPopText.text       = "Foreign born Population: " + MigrationFramework.getFrPop();
        usPopText.text       = "Native born Population: " + MigrationFramework.getUsPop();

        migrantsText.text = "NE Migrants: " + MigrationFramework.getSpecificPopValue("neMigrants")
                            + "\nMW Migrants: " + MigrationFramework.getSpecificPopValue("mwMigrants")
                            + "\nSouth Migrants: " + MigrationFramework.getSpecificPopValue("sMigrants")
                            + "\nWest Migrants: " + MigrationFramework.getSpecificPopValue("wMigrants");

        usEdText.text = "Below High School: " + MigrationFramework.getSpecificPopValue("usLessThanHighschool")
                        + "\nSome High School: " + MigrationFramework.getSpecificPopValue("usHighschool")
                        + "\nHigh School Diploma: " + MigrationFramework.getSpecificPopValue("usHighschoolGrad")
                        + "\nTwo Year Diploma: " + MigrationFramework.getSpecificPopValue("usTwoYear")
                        + "\nBachelors Diploma: " + MigrationFramework.getSpecificPopValue("usBachelors")
                        + "\nOther: " + MigrationFramework.getSpecificPopValue("usOther");

        frEdText.text = "Below High School: " + MigrationFramework.getSpecificPopValue("frLessThanHighschool")
                        + "\nSome High School: " + MigrationFramework.getSpecificPopValue("frHighschool")
                        + "\nHigh School Diploma: " + MigrationFramework.getSpecificPopValue("frHighschoolGrad")
                        + "\nTwo Year Diploma: " + MigrationFramework.getSpecificPopValue("frTwoYear")
                        + "\nBachelors Diploma: " + MigrationFramework.getSpecificPopValue("frBachelors")
                        + "\nOther: " + MigrationFramework.getSpecificPopValue("frOther");

        usIncText.text = "Incarceration Number: " + MigrationFramework.getSpecificPopValue("usInc");

        frIncText.text = "Incarceration Number: " + MigrationFramework.getSpecificPopValue("frInc")
                         + "\nLegal Incarceration: " + MigrationFramework.getSpecificPopValue("frLegalInc")
                         + "\nIllegal Incarceration: " + MigrationFramework.getSpecificPopValue("frIllegalInc");

        usUnemText.text = "Unemployment Number: " + MigrationFramework.getSpecificPopValue("usUnEm")
                          + "\nOut of Work Force: " + MigrationFramework.getSpecificPopValue("usUnEm");

        frUnemText.text = "Unemployment Number: " + MigrationFramework.getSpecificPopValue("frUnEm")
                          + "\nOut of Work Force: " + MigrationFramework.getSpecificPopValue("frNotWorking");
    }