Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.util.Pair;

public class Main {
    private static Pair<Integer, Integer> rankPosition(String taxon) {

        int i = taxon.indexOf("subsp.");

        if (i < 0) {

            i = taxon.indexOf("form.");

            if (i < 0) {

                i = taxon.indexOf("var.");

                if (i < 0) {

                    return new Pair<Integer, Integer>(-1, -1);

                } else {

                    return new Pair<Integer, Integer>(i, 4);

                }

            } else {

                return new Pair<Integer, Integer>(i, 5);

            }
        } else {

            return new Pair<Integer, Integer>(i, 6);

        }
    }
}