Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.util.List;

public class Main {
    public static <T> int getIndexOf(List<T> configurationSources, Class<? extends T> clazz) {
        int i = 0;
        for (; i < configurationSources.size(); i++) {
            if (clazz.isInstance(configurationSources.get(i))) {
                return i;
            }
        }
        return -1;
    }
}